diff options
author | Igor Zinkovsky <igor@deno.com> | 2023-11-16 14:19:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 14:19:00 -0800 |
commit | b572abfcb3fadbfdd3ce671a27463d67bcb77534 (patch) | |
tree | a3b783218079b01b16a331f7522d3a3935603520 /cli/tests/integration/npm_tests.rs | |
parent | 6b42cecc064d01d87aae978ecd7eb372bfe9a34e (diff) |
feat(ext/cron) modify Deno.cron API to make handler arg last (#21225)
This PR changes the `Deno.cron` API:
* Marks the existing function as deprecated
* Introduces 2 new overloads, where the handler arg is always last:
```ts
Deno.cron(
name: string,
schedule: string,
handler: () => Promise<void> | void,
)
Deno.cron(
name: string,
schedule: string,
options?: { backoffSchedule?: number[]; signal?: AbortSignal },
handler: () => Promise<void> | void,
)
```
This PR also fixes a bug, when other crons continue execution after one
of the crons was closed using `signal`.
Diffstat (limited to 'cli/tests/integration/npm_tests.rs')
0 files changed, 0 insertions, 0 deletions