Summary#
Raise answers OK once the event is accepted; its [On] handlers run after that, and a handler that throws on all its
tries leaves the event Failed ([[function-on#failure]]). Inside the app, gated code can send it again with
Events.Redeliver(id). From outside, an operator uses two verbs.
Signature#
$ osyrin app events failed --app <slug> # list: id, event type, handler, failed at, last error
$ osyrin app events redeliver <id> --app <slug> # send one Failed event againDescription#
Listing#
One row per Failed event: its id, the event type, the handler(s) still owed it, when it was given up on and the last
error (the handler's exception type and message, redacted as the app's log is). Never a value of the event —
read the record it was about in the app if you need it. --json prints the same rows.
Redelivering#
redeliver <id> resets that one event to waiting, with every try ahead of it, and delivers it now through the platform's
own outbox code:
- Only a Failed event. A delivered or still-waiting event, an unknown id, or one another operator redelivered a moment earlier is refused by name.
- Exactly the handler it was owed to. A handler that already succeeded on that event is not run again, so there is no second fan-out.
- Who: the application's Owner or Admin (or an owner or admin of its organization, or a platform operator), enforced on
the server. A Developer is refused. On an application a zone serves, Admin signs an
eventsgrant for it, and a redeliver's grant names the one event. - Audited: an
EventRedeliveredline on the app's sign-in trail (AuthAuditEntry) names the operator, the event id and the handler.
A handler may run more than once over an event's life, so write it so a second run does no harm ([[function-on#failure]]). The verb is the one redeliver path from outside the app; there is no REST or SQL way around it.
See also#
- [On] — hear an event, after the commit that raised it — how a handler fails, is retried, and ends Failed;
Events.Redeliverfrom inside the app - Stopping runs after a bad deploy — the operator's other write on a deployed app's workflow work