feat(task): add task labels and push-based task events
This commit is contained in:
@@ -17,6 +17,7 @@ export interface ITaskMetadata {
|
||||
timeout?: number;
|
||||
lastError?: string;
|
||||
errorCount?: number;
|
||||
labels?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ITaskExecutionReport {
|
||||
@@ -38,4 +39,14 @@ export interface IScheduledTaskInfo {
|
||||
lastRun?: Date;
|
||||
steps?: ITaskStep[];
|
||||
metadata?: ITaskMetadata;
|
||||
}
|
||||
|
||||
export type TTaskEventType = 'started' | 'step' | 'completed' | 'failed';
|
||||
|
||||
export interface ITaskEvent {
|
||||
type: TTaskEventType;
|
||||
task: ITaskMetadata;
|
||||
timestamp: number;
|
||||
stepName?: string; // present when type === 'step'
|
||||
error?: string; // present when type === 'failed'
|
||||
}
|
||||
Reference in New Issue
Block a user