2022-11-14 13:54:26 +00:00
|
|
|
import { Task } from './taskbuffer.classes.task.js';
|
2022-11-09 09:36:18 +00:00
|
|
|
import * as plugins from './taskbuffer.plugins.js';
|
|
|
|
|
2022-11-14 13:54:26 +00:00
|
|
|
/**
|
|
|
|
* constains all data for the final coordinator to actually make an informed decision
|
|
|
|
*/
|
|
|
|
export interface IDistributedDecisionInfoBasis {
|
2023-01-07 18:05:29 +00:00
|
|
|
submitterRandomId: string;
|
2022-11-14 13:54:26 +00:00
|
|
|
taskName: string;
|
|
|
|
taskVersion: string;
|
|
|
|
taskExecutionTime: number;
|
|
|
|
taskExecutionTimeout: number;
|
|
|
|
taskExecutionParallel: number;
|
|
|
|
status: 'requesting' | 'gotRejected' | 'failed' | 'succeeded';
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITaskConsultationResult {
|
|
|
|
considered: boolean;
|
|
|
|
rank: string;
|
|
|
|
reason: string;
|
|
|
|
shouldTrigger: boolean;
|
|
|
|
}
|
|
|
|
|
2023-01-09 17:40:38 +00:00
|
|
|
export abstract class AbstractDistributedCoordinator {
|
|
|
|
public abstract announceDistributedDecisionInfoBasis(infoBasisArg: IDistributedDecisionInfoBasis): Promise<ITaskConsultationResult>
|
|
|
|
public abstract updateDistributedDevisionInfoBasis(infoBasisArg: IDistributedDecisionInfoBasis): Promise<void>
|
2022-11-09 09:36:18 +00:00
|
|
|
}
|