@push.rocks/taskbuffer 3.0.14 → 3.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6129,14 +6129,14 @@ var AbstractDistributedCoordinator = class {
6129
6129
 
6130
6130
  // ts/taskbuffer.classes.taskmanager.ts
6131
6131
  var TaskManager = class {
6132
- constructor(optionosArg = {}) {
6132
+ constructor(optionsArg = {}) {
6133
6133
  this.randomId = isounique2.uni();
6134
6134
  this.taskMap = new dist_ts_exports5.ObjectMap();
6135
6135
  this.cronJobManager = new dist_ts_exports6.CronManager();
6136
6136
  this.options = {
6137
6137
  distributedCoordinator: null
6138
6138
  };
6139
- this.options = Object.assign(this.options, optionosArg);
6139
+ this.options = Object.assign(this.options, optionsArg);
6140
6140
  }
6141
6141
  /**
6142
6142
  * checks if a task is already present
@@ -6238,10 +6238,15 @@ var TaskManager = class {
6238
6238
  await this.descheduleTaskByName(task.name);
6239
6239
  }
6240
6240
  /**
6241
- * returns all schedules of a specific task
6242
- * @param taskNameArg
6243
- */
6244
- getSchedulesForTaskName(taskNameArg) {
6241
+ * returns the schedule of a specific task
6242
+ * @param taskNameArg
6243
+ */
6244
+ getScheduleForTaskName(taskNameArg) {
6245
+ const task = this.getTaskByName(taskNameArg);
6246
+ if (!task || !task.cronJob) {
6247
+ return null;
6248
+ }
6249
+ return task.cronJob.cronExpression;
6245
6250
  }
6246
6251
  /**
6247
6252
  * starts the taskmanager