@arkstack/scheduler 0.17.15 → 0.17.17

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.
@@ -1,5 +1,4 @@
1
1
  import { Command } from "@h3ravel/musket";
2
-
3
2
  //#region src/commands/ScheduleListCommand.d.ts
4
3
  /**
5
4
  * List the application's scheduled tasks with their cron expression and next
@@ -1,4 +1,4 @@
1
- import { n as Schedule, t as loadSchedule } from "../loader-zz_XJXwZ.js";
1
+ import { n as Schedule, t as loadSchedule } from "../loader-BgSccyLB.js";
2
2
  import { Command } from "@h3ravel/musket";
3
3
  //#region src/commands/ScheduleListCommand.ts
4
4
  /**
@@ -1,5 +1,4 @@
1
1
  import { Command } from "@h3ravel/musket";
2
-
3
2
  //#region src/commands/ScheduleRunCommand.d.ts
4
3
  /**
5
4
  * Run the scheduled tasks that are due right now. Invoke this once a minute from
@@ -1,5 +1,5 @@
1
- import { t as loadSchedule } from "../loader-zz_XJXwZ.js";
2
- import { t as runDueEvents } from "../runner-DFEYebtg.js";
1
+ import { t as loadSchedule } from "../loader-BgSccyLB.js";
2
+ import { t as runDueEvents } from "../runner-p2S8_S-d.js";
3
3
  import { Command } from "@h3ravel/musket";
4
4
  //#region src/commands/ScheduleRunCommand.ts
5
5
  /**
@@ -1,5 +1,4 @@
1
1
  import { Command } from "@h3ravel/musket";
2
-
3
2
  //#region src/commands/ScheduleWorkCommand.d.ts
4
3
  /**
5
4
  * Run the scheduler in the foreground, evaluating due tasks at the top of every
@@ -1,5 +1,5 @@
1
- import { t as loadSchedule } from "../loader-zz_XJXwZ.js";
2
- import { t as runDueEvents } from "../runner-DFEYebtg.js";
1
+ import { t as loadSchedule } from "../loader-BgSccyLB.js";
2
+ import { t as runDueEvents } from "../runner-p2S8_S-d.js";
3
3
  import { Command } from "@h3ravel/musket";
4
4
  //#region src/commands/ScheduleWorkCommand.ts
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -232,10 +232,10 @@ declare class Schedule {
232
232
  static call(callback: TaskCallback): ScheduledEvent;
233
233
  /**
234
234
  * Dispatch a queued job on the schedule (requires `@arkstack/jobs`).
235
- *
236
- * @param callback
237
- * @returns
238
- */
235
+ *
236
+ * @param callback
237
+ * @returns
238
+ */
239
239
  static job(job: object): ScheduledEvent;
240
240
  /**
241
241
  * Run a shell command on the schedule.
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as nextRun, i as isDue, n as Schedule, o as acquireLock, r as ScheduledEvent, s as releaseLock, t as loadSchedule } from "./loader-zz_XJXwZ.js";
2
- import { t as runDueEvents } from "./runner-DFEYebtg.js";
1
+ import { a as nextRun, i as isDue, n as Schedule, o as acquireLock, r as ScheduledEvent, s as releaseLock, t as loadSchedule } from "./loader-BgSccyLB.js";
2
+ import { t as runDueEvents } from "./runner-p2S8_S-d.js";
3
3
  export { Schedule, ScheduledEvent, acquireLock, isDue, loadSchedule, nextRun, releaseLock, runDueEvents };
@@ -472,7 +472,8 @@ var ScheduledEvent = class {
472
472
  };
473
473
  if (this.onOneServerValue) {
474
474
  const minute = Math.floor(date.getTime() / 6e4);
475
- if (!await acquireLock(`${this.mutexName()}-server-${minute}`, 60)) return {
475
+ const key = `${this.mutexName()}-server-${minute}`;
476
+ if (!await acquireLock(key, 60)) return {
476
477
  ...base,
477
478
  ran: false,
478
479
  skipped: "one-server"
@@ -1,4 +1,4 @@
1
- import { n as Schedule } from "./loader-zz_XJXwZ.js";
1
+ import { n as Schedule } from "./loader-BgSccyLB.js";
2
2
  //#region src/runner.ts
3
3
  /**
4
4
  * Run every event that is due at `now` and whose filters pass, collecting a
package/dist/setup.d.ts CHANGED
@@ -1 +1 @@
1
- export { };
1
+ export {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/scheduler",
3
- "version": "0.17.15",
3
+ "version": "0.17.17",
4
4
  "type": "module",
5
5
  "description": "Task scheduling for Arkstack: fluent frequencies, cron, overlap/one-server locks, hooks, and schedule:run/work/list commands.",
6
6
  "homepage": "https://arkstack.toneflix.net/guide/scheduling",
@@ -33,13 +33,13 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "croner": "^9.0.0",
36
- "@arkstack/common": "^0.17.15"
36
+ "@arkstack/common": "^0.17.17"
37
37
  },
38
38
  "peerDependencies": {
39
- "@h3ravel/musket": "^2.2.2",
40
- "@arkstack/contract": "^0.17.15",
41
- "@arkstack/cache": "^0.17.15",
42
- "@arkstack/jobs": "^0.17.15"
39
+ "@h3ravel/musket": "^2.2.13",
40
+ "@arkstack/contract": "^0.17.17",
41
+ "@arkstack/cache": "^0.17.17",
42
+ "@arkstack/jobs": "^0.17.17"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "@arkstack/cache": {