Compare commits

..

2 Commits

Author SHA1 Message Date
94e327c722 3.0.15 2023-08-04 11:58:54 +02:00
57a27604a7 fix(core): update 2023-08-04 11:58:53 +02:00
3 changed files with 16 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/taskbuffer",
"version": "3.0.14",
"version": "3.0.15",
"private": false,
"description": "flexible task management. TypeScript ready!",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/taskbuffer',
version: '3.0.14',
version: '3.0.15',
description: 'flexible task management. TypeScript ready!'
}

View File

@ -21,8 +21,8 @@ export class TaskManager {
distributedCoordinator: null,
};
constructor(optionosArg: ITaskManagerConstructorOptions = {}) {
this.options = Object.assign(this.options, optionosArg);
constructor(optionsArg: ITaskManagerConstructorOptions = {}) {
this.options = Object.assign(this.options, optionsArg);
}
/**
@ -137,11 +137,19 @@ export class TaskManager {
public async descheduleTask(task: Task) {
await this.descheduleTaskByName(task.name);
}
/**
* returns all schedules of a specific task
* @param taskNameArg
*/
public getSchedulesForTaskName(taskNameArg: string) {}
* returns the schedule of a specific task
* @param taskNameArg
*/
public getScheduleForTaskName(taskNameArg: string): string | null {
const task = this.getTaskByName(taskNameArg);
if (!task || !task.cronJob) {
return null;
}
return task.cronJob.cronExpression;
}
/**
* starts the taskmanager