fix(core): update
This commit is contained in:
parent
d04ed21607
commit
6499dd45cf
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/taskbuffer',
|
name: '@push.rocks/taskbuffer',
|
||||||
version: '3.1.2',
|
version: '3.1.3',
|
||||||
description: 'flexible task management. TypeScript ready!'
|
description: 'flexible task management. TypeScript ready!'
|
||||||
}
|
}
|
||||||
|
@ -30,4 +30,7 @@ export abstract class AbstractDistributedCoordinator {
|
|||||||
public abstract updateDistributedTaskRequest(
|
public abstract updateDistributedTaskRequest(
|
||||||
infoBasis: IDistributedTaskRequest
|
infoBasis: IDistributedTaskRequest
|
||||||
): Promise<void>;
|
): Promise<void>;
|
||||||
|
|
||||||
|
public abstract start(): Promise<void>;
|
||||||
|
public abstract stop(): Promise<void>;
|
||||||
}
|
}
|
||||||
|
@ -121,11 +121,17 @@ export class TaskManager {
|
|||||||
return task && task.cronJob ? task.cronJob.cronExpression : null;
|
return task && task.cronJob ? task.cronJob.cronExpression : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public start() {
|
public async start() {
|
||||||
|
if (this.options.distributedCoordinator) {
|
||||||
|
await this.options.distributedCoordinator.start();
|
||||||
|
}
|
||||||
this.cronJobManager.start();
|
this.cronJobManager.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public stop() {
|
public async stop() {
|
||||||
this.cronJobManager.stop();
|
this.cronJobManager.stop();
|
||||||
|
if (this.options.distributedCoordinator) {
|
||||||
|
await this.options.distributedCoordinator.stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user