Recoverable tasks [version 1]

Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2024-01-14 16:18:42 +01:00
parent 56d3373c82
commit 11b9a08e92
31 changed files with 473 additions and 62 deletions
+3 -1
View File
@@ -65,7 +65,7 @@ export type SerializedTask = {
*
* @public
*/
export type TaskEventType = 'completion' | 'log' | 'cancelled';
export type TaskEventType = 'completion' | 'log' | 'cancelled' | 'recovered';
/**
* SerializedTaskEvent
@@ -131,6 +131,8 @@ export interface TaskBroker {
claim(): Promise<TaskContext>;
recoverTasks?(): Promise<boolean>;
dispatch(
options: TaskBrokerDispatchOptions,
): Promise<TaskBrokerDispatchResult>;