feat: add retryCount field

This commit is contained in:
Rohit Rajan
2025-09-10 00:12:11 +05:30
parent 24fd0590d8
commit 1374591695

View File

@@ -25,6 +25,7 @@ interface RunAttributes {
runByAPI?: boolean; runByAPI?: boolean;
serializableOutput: Record<string, any[]>; serializableOutput: Record<string, any[]>;
binaryOutput: Record<string, string>; binaryOutput: Record<string, string>;
retryCount?: number;
} }
interface RunCreationAttributes extends Optional<RunAttributes, 'id'> { } interface RunCreationAttributes extends Optional<RunAttributes, 'id'> { }
@@ -46,6 +47,7 @@ class Run extends Model<RunAttributes, RunCreationAttributes> implements RunAttr
public runByAPI!: boolean; public runByAPI!: boolean;
public serializableOutput!: Record<string, any[]>; public serializableOutput!: Record<string, any[]>;
public binaryOutput!: Record<string, any>; public binaryOutput!: Record<string, any>;
public retryCount!: number;
} }
Run.init( Run.init(
@@ -120,6 +122,11 @@ Run.init(
allowNull: true, allowNull: true,
defaultValue: {}, defaultValue: {},
}, },
retryCount: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: 0,
},
}, },
{ {
sequelize, sequelize,