Where the worker reports how each run ended (BOU-832): the store's record, metrics, the error tracker and the application's own hook. Each is optional, and none can fail a job.
Failure and staleness reports share one throttle per job type, a claim in the idempotency store, so nodes sharing that store report once between them (BOU-834).
Where the worker reports how each run ended (BOU-832): the store's record, metrics, the error tracker and the application's own hook. Each is optional, and none can fail a job. Failure and staleness reports share one throttle per job type, a claim in the idempotency store, so nodes sharing that store report once between them (BOU-834).
(check-stale! {:keys [store registry idempotency error-reporter expect-success
report-failures-every-ms]}
now)Report each job type in expect-success, {job-type hours}, whose last
success on store is older than its hours at now, through the same
throttle as failures. A type that has no record or never succeeded is not
stale: its failures are reported already. Given registry, only types it
has a handler for are checked, so a type switched off here is not reported
every day. A report that fails does not stop the others. Returns the types
reported.
Report each job type in `expect-success`, {job-type hours}, whose last
success on `store` is older than its hours at `now`, through the same
throttle as failures. A type that has no record or never succeeded is not
stale: its failures are reported already. Given `registry`, only types it
has a handler for are checked, so a type switched off here is not reported
every day. A report that fails does not stop the others. Returns the types
reported.While a job type keeps failing, the error tracker hears of it this often.
While a job type keeps failing, the error tracker hears of it this often.
(registered-outcomes store registry)store's job-outcomes for the job types registry has a handler for, so
a type that was renamed or removed drops out.
`store`'s `job-outcomes` for the job types `registry` has a handler for, so a type that was renamed or removed drops out.
(reporter {:keys [store metrics error-reporter on-outcome
report-failures-every-ms idempotency]})A fn of a run's outcome that records it on store when the store
implements IJobOutcomes, emits it to metrics, sends a failure to
error-reporter (the first after a success, then one per
report-failures-every-ms), and calls on-outcome. Every key is optional;
the fn never throws.
idempotency (IIdempotencyStore) holds the throttle; give every node the
same one and a failing type is reported once between them. Without it the
throttle is this reporter's own.
A fn of a run's outcome that records it on `store` when the store implements `IJobOutcomes`, emits it to `metrics`, sends a failure to `error-reporter` (the first after a success, then one per `report-failures-every-ms`), and calls `on-outcome`. Every key is optional; the fn never throws. `idempotency` (`IIdempotencyStore`) holds the throttle; give every node the same one and a failing type is reported once between them. Without it the throttle is this reporter's own.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |