Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
94e327c722 | |||
57a27604a7 | |||
b077bd7a1b | |||
f2c2dab782 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/taskbuffer",
|
"name": "@push.rocks/taskbuffer",
|
||||||
"version": "3.0.13",
|
"version": "3.0.15",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "flexible task management. TypeScript ready!",
|
"description": "flexible task management. TypeScript ready!",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/taskbuffer',
|
name: '@push.rocks/taskbuffer',
|
||||||
version: '3.0.13',
|
version: '3.0.15',
|
||||||
description: 'flexible task management. TypeScript ready!'
|
description: 'flexible task management. TypeScript ready!'
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ export class BufferRunner {
|
|||||||
// initialize by default
|
// initialize by default
|
||||||
public bufferCounter: number = 0;
|
public bufferCounter: number = 0;
|
||||||
|
|
||||||
constructor(taskArg: Task) {
|
constructor(taskArg: Task<any>) {
|
||||||
this.task = taskArg;
|
this.task = taskArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ export interface ICycleObject {
|
|||||||
export class CycleCounter {
|
export class CycleCounter {
|
||||||
public task: Task;
|
public task: Task;
|
||||||
public cycleObjectArray: ICycleObject[] = [];
|
public cycleObjectArray: ICycleObject[] = [];
|
||||||
constructor(taskArg: Task) {
|
constructor(taskArg: Task<any>) {
|
||||||
this.task = taskArg;
|
this.task = taskArg;
|
||||||
}
|
}
|
||||||
public getPromiseForCycle(cycleCountArg: number) {
|
public getPromiseForCycle(cycleCountArg: number) {
|
||||||
|
@ -21,8 +21,8 @@ export class TaskManager {
|
|||||||
distributedCoordinator: null,
|
distributedCoordinator: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(optionosArg: ITaskManagerConstructorOptions = {}) {
|
constructor(optionsArg: ITaskManagerConstructorOptions = {}) {
|
||||||
this.options = Object.assign(this.options, optionosArg);
|
this.options = Object.assign(this.options, optionsArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -137,11 +137,19 @@ export class TaskManager {
|
|||||||
public async descheduleTask(task: Task) {
|
public async descheduleTask(task: Task) {
|
||||||
await this.descheduleTaskByName(task.name);
|
await this.descheduleTaskByName(task.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns all schedules of a specific task
|
* returns the schedule of a specific task
|
||||||
* @param taskNameArg
|
* @param taskNameArg
|
||||||
*/
|
*/
|
||||||
public getSchedulesForTaskName(taskNameArg: string) {}
|
public getScheduleForTaskName(taskNameArg: string): string | null {
|
||||||
|
const task = this.getTaskByName(taskNameArg);
|
||||||
|
if (!task || !task.cronJob) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return task.cronJob.cronExpression;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* starts the taskmanager
|
* starts the taskmanager
|
||||||
|
Reference in New Issue
Block a user