Checkpoint

Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2024-02-04 21:30:32 +01:00
parent 911557bae8
commit 07c2c2e7a7
7 changed files with 39 additions and 8 deletions
+1 -1
View File
@@ -26,5 +26,5 @@ export type {
TaskEventType,
TaskState,
TaskStatus,
UpdateCheckpointOptions,
CheckpointRecord,
} from './types';
+5 -3
View File
@@ -116,12 +116,12 @@ export type TaskBrokerDispatchOptions = {
};
/**
* The options passed to {@link TaskBroker.updateCheckpoint}
* The record passed to {@link TaskBroker.updateCheckpoint?}
* Parameters to store the result of the executed checkpoint
*
* @public
*/
export type UpdateCheckpointOptions =
export type CheckpointRecord =
| {
key: string;
status: 'success';
@@ -151,7 +151,9 @@ export interface TaskContext {
emitLog(message: string, logMetadata?: JsonObject): Promise<void>;
updateCheckpoint?(options: UpdateCheckpointOptions): Promise<void>;
getCheckpoints?(): Promise<{ state: TaskState } | undefined>;
updateCheckpoint?(options: CheckpointRecord): Promise<void>;
getWorkspaceName(): Promise<string>;
}