@ddd-ts-kit/scheduling 0.113.1 → 0.114.1

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.
package/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:f62d71a7d5bd47a1 -->
2
+ <!-- translation-of: README.md sha256:2a21a83f1d408547 -->
3
3
 
4
4
  # @ddd-ts-kit/scheduling
5
5
 
@@ -27,7 +27,7 @@ Les déclarations (`@Scheduled`, `@Background`), les ports (`JobScheduler`, `Job
27
27
  `InProcessJobScheduler` dans son module kernel et enregistre les *jobs* déclarés : une application
28
28
  construite avec lui n'a besoin d'aucune ligne de ce README, hormis le *job* lui-même.
29
29
 
30
- ![La couche application d'un contexte délimité déclare ses jobs à l'aide du kernel, qui porte les déclarations et les ports JobScheduler, JobQueue et ProcessRunner, et n'importe jamais ce package ; ce package implémente ces ports, exécute les jobs et appelle le Lock, le JobStore et les JobCheckpoints que lie la plateforme ; le module kernel de @ddd-ts-kit/di lie chaque port à son implémentation et enregistre les jobs déclarés](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-place.fr.svg)
30
+ ![La couche application d'un contexte délimité déclare ses jobs à l'aide du kernel, qui porte les déclarations et les ports JobScheduler, JobQueue et ProcessRunner, et n'importe jamais ce package ; ce package implémente ces ports, exécute les jobs et appelle le Lock, le JobStore et les JobCheckpoints que lie la plateforme ; le module kernel de @ddd-ts-kit/di lie chaque port à son implémentation et enregistre les jobs déclarés](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-place.fr.svg)
31
31
 
32
32
  `JobScheduler` n'est pas le `Scheduler` de `@ddd-ts-kit/aspects`. Celui-là est un minuteur pour
33
33
  les nouvelles tentatives et les délais d'expiration (`schedule(work, delayMs)`) ; celui-ci connaît
@@ -159,7 +159,7 @@ chaque instance nomme les mêmes instants, et qu'un redémarrage les conserve. U
159
159
  divise pas une journée (`'7h'`) dérive par rapport à l'heure murale, et aucun ne suit un fuseau
160
160
  horaire : pour « chaque matin », écrivez un cron.
161
161
 
162
- ![Deux instances démarrées à 10:07 et à 10:11 : alignées sur l'époque, les deux nomment les occurrences 10:15, 10:30, 10:45 et 11:00, donc une clé de verrou par occurrence et une seule instance l'exécute ; en comptant depuis le démarrage de chaque processus, la première nommerait 10:22, 10:37, 10:52 et la seconde 10:26, 10:41, 10:56, des clés différentes, et les deux exécuteraient](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-interval-alignment.fr.svg)
162
+ ![Deux instances démarrées à 10:07 et à 10:11 : alignées sur l'époque, les deux nomment les occurrences 10:15, 10:30, 10:45 et 11:00, donc une clé de verrou par occurrence et une seule instance l'exécute ; en comptant depuis le démarrage de chaque processus, la première nommerait 10:22, 10:37, 10:52 et la seconde 10:26, 10:41, 10:56, des clés différentes, et les deux exécuteraient](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-interval-alignment.fr.svg)
163
163
 
164
164
  **Le cron** a les cinq champs standard, sans les secondes :
165
165
 
@@ -233,7 +233,7 @@ nextOccurrence(parseJobSchedule({ cron: '30 2 * * *', timeZone: 'Europe/Paris' }
233
233
  Chaque option agit à une étape d'une occurrence, et chaque étape qui l'arrête enregistre une issue
234
234
  (voir « Observabilité ») :
235
235
 
236
- ![Une occurrence devient due ; atteinte plus tard que lateAfterMs avec missed skip, elle est enregistrée missed ; avec l'exécution précédente encore en cours et overlap skip, skipped-overlap ; pour un job singleInstance, le planificateur prend le verrou de l'occurrence, détenu par une autre instance il enregistre skipped-locked, injoignable failed avec JOB_LOCK_UNAVAILABLE ; une fois le verrou pris, le job s'exécute dans une portée d'exécution et réussit, ou échoue avec son code, JOB_TIMEOUT ou JOB_ABORTED ; chaque issue est journalisée, comptée et donnée à onRun](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-one-occurrence.fr.svg)
236
+ ![Une occurrence devient due ; atteinte plus tard que lateAfterMs avec missed skip, elle est enregistrée missed ; avec l'exécution précédente encore en cours et overlap skip, skipped-overlap ; pour un job singleInstance, le planificateur prend le verrou de l'occurrence, détenu par une autre instance il enregistre skipped-locked, injoignable failed avec JOB_LOCK_UNAVAILABLE ; une fois le verrou pris, le job s'exécute dans une portée d'exécution et réussit, ou échoue avec son code, JOB_TIMEOUT ou JOB_ABORTED ; chaque issue est journalisée, comptée et donnée à onRun](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-one-occurrence.fr.svg)
237
237
 
238
238
  **Manquée** veut dire atteinte plus tard que `lateAfterMs` (60 s par défaut, une option du
239
239
  planificateur) après l'instant, gigue mise à part : le processus était arrêté, en veille, ou sa
package/README.md CHANGED
@@ -25,7 +25,7 @@ the kernel and nothing else. `@ddd-ts-kit/di` binds `JobScheduler` to an `InProc
25
25
  in its kernel module and registers the declared jobs: an application built with it needs no line
26
26
  of this README but the job itself.
27
27
 
28
- ![The application layer of a bounded context declares its jobs against the kernel, which holds the declarations and the JobScheduler, JobQueue and ProcessRunner ports, and never imports this package; this package implements those ports, runs the jobs and calls the Lock, the JobStore and the JobCheckpoints the platform binds; the kernel module of @ddd-ts-kit/di binds every port to its implementation and registers the declared jobs](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-place.svg)
28
+ ![The application layer of a bounded context declares its jobs against the kernel, which holds the declarations and the JobScheduler, JobQueue and ProcessRunner ports, and never imports this package; this package implements those ports, runs the jobs and calls the Lock, the JobStore and the JobCheckpoints the platform binds; the kernel module of @ddd-ts-kit/di binds every port to its implementation and registers the declared jobs](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-place.svg)
29
29
 
30
30
  `JobScheduler` is not the `Scheduler` of `@ddd-ts-kit/aspects`. That one is a timer for retry
31
31
  and timeout (`schedule(work, delayMs)`); this one knows jobs, schedules and instances.
@@ -151,7 +151,7 @@ instance name the same instants, and a restart keep them. An interval that does
151
151
  day (`'7h'`) drifts against the wall clock, and none follows a time zone: for "every morning",
152
152
  write a cron.
153
153
 
154
- ![Two instances started at 10:07 and 10:11: aligned on the epoch, both name the occurrences 10:15, 10:30, 10:45 and 11:00, so one lock key per occurrence and one instance runs it; counted from the start of each process, the first would name 10:22, 10:37, 10:52 and the second 10:26, 10:41, 10:56, different keys, and both would run](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-interval-alignment.svg)
154
+ ![Two instances started at 10:07 and 10:11: aligned on the epoch, both name the occurrences 10:15, 10:30, 10:45 and 11:00, so one lock key per occurrence and one instance runs it; counted from the start of each process, the first would name 10:22, 10:37, 10:52 and the second 10:26, 10:41, 10:56, different keys, and both would run](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-interval-alignment.svg)
155
155
 
156
156
  **Cron** has the five standard fields, no seconds:
157
157
 
@@ -223,7 +223,7 @@ Written next to the schedule: `{ every: '15m', overlap: 'queue', timeoutMs: 60_0
223
223
  Each option acts at one step of an occurrence, and each step that stops it records an outcome
224
224
  (see "Observability"):
225
225
 
226
- ![An occurrence becomes due; reached later than lateAfterMs with missed skip, it is recorded missed; with the previous run still in progress and overlap skip, skipped-overlap; for a singleInstance job the scheduler takes the lock of the occurrence, held by another instance it records skipped-locked, unreachable failed with JOB_LOCK_UNAVAILABLE; taken, the job runs in an execution scope and succeeds or fails with its code, JOB_TIMEOUT or JOB_ABORTED; every outcome is logged, counted and given to onRun](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-one-occurrence.svg)
226
+ ![An occurrence becomes due; reached later than lateAfterMs with missed skip, it is recorded missed; with the previous run still in progress and overlap skip, skipped-overlap; for a singleInstance job the scheduler takes the lock of the occurrence, held by another instance it records skipped-locked, unreachable failed with JOB_LOCK_UNAVAILABLE; taken, the job runs in an execution scope and succeeds or fails with its code, JOB_TIMEOUT or JOB_ABORTED; every outcome is logged, counted and given to onRun](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/scheduling-package-one-occurrence.svg)
227
227
 
228
228
  **Missed** means reached later than `lateAfterMs` (60 s by default, an option of the
229
229
  scheduler) after the instant, jitter aside: the process was down, asleep, or its event loop
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/scheduling",
3
- "version": "0.113.1",
3
+ "version": "0.114.1",
4
4
  "description": "Scheduled jobs that only trigger use cases: interval and cron schedules, one run across instances, no overlap, each run in its own execution scope.",
5
5
  "keywords": [
6
6
  "ddd",
@@ -16,11 +16,11 @@
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/gbourgeat/ddd-ts-kit.git",
19
+ "url": "git+https://github.com/ddd-ts-kit/ddd-ts-kit.git",
20
20
  "directory": "packages/scheduling"
21
21
  },
22
- "homepage": "https://gbourgeat.github.io/ddd-ts-kit/packages/scheduling/",
23
- "bugs": "https://github.com/gbourgeat/ddd-ts-kit/issues",
22
+ "homepage": "https://ddd-ts-kit.github.io/ddd-ts-kit/packages/scheduling/",
23
+ "bugs": "https://github.com/ddd-ts-kit/ddd-ts-kit/issues",
24
24
  "publishConfig": {
25
25
  "access": "public",
26
26
  "provenance": true
@@ -44,9 +44,9 @@
44
44
  "dist"
45
45
  ],
46
46
  "dependencies": {
47
- "@ddd-ts-kit/kernel": "0.113.1"
47
+ "@ddd-ts-kit/kernel": "0.114.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@ddd-ts-kit/testing": "0.113.1"
50
+ "@ddd-ts-kit/testing": "0.114.1"
51
51
  }
52
52
  }