|
8 | 8 | * SPDX-License-Identifier: LGPL-3.0 |
9 | 9 | \************************************************************/ |
10 | 10 |
|
11 | | -/* journal.c - job event journaling and streaming to listeners |
| 11 | +/* journal.c - stream job events |
| 12 | + * |
| 13 | + * This allows another service to track detailed information about |
| 14 | + * all jobs. The journal consumer makes a job-manger.events-journal |
| 15 | + * request with optional allow/deny filter and boolean 'full' flag: |
| 16 | + * {"full"?b, "allow"?{"name":1, ...}, "deny"?{"name:1, ...}} |
| 17 | + * |
| 18 | + * If "full" is true, the journal begins with all the inactive jobs. |
| 19 | + * If "full" is false, the journal begins with all the active jobs. |
| 20 | + * If "full" is unspecified, it is assumed to be false. |
| 21 | + * If allow/deny rules are specified, they filter the job events by name. |
| 22 | + * |
| 23 | + * The journal consumer receives a stream of responses until the job |
| 24 | + * manager is unloaded or the request is canceled. Each response consists of |
| 25 | + * an object containing a jobid, an array of events, and optional data: |
| 26 | + * {"id":I, "events":[], "jobspec"?s, "R"?s} |
| 27 | + * |
| 28 | + * During processing of the initial backlog, the events array will contain |
| 29 | + * all the events posted so far for each job, plus R and jobspec if available. |
| 30 | + * The jobs are returned in hash traversal order. Once backlog processing |
| 31 | + * is complete, a sentinel response is transmitted with id of FLUX_JOBID_ANY |
| 32 | + * and an empty events array: |
| 33 | + * {"id":-1, "events":[]} |
| 34 | + * |
| 35 | + * The sentinel informs the consumer that it is now caught up and that future |
| 36 | + * responses will be for events that are are posted in real time. |
| 37 | + * |
| 38 | + * Additional responses contain at most one event. The redacted jobspec is |
| 39 | + * included with the "validate" event. The redacted R object is included |
| 40 | + * with the "alloc" event. |
12 | 41 | */ |
13 | 42 |
|
14 | 43 | #if HAVE_CONFIG_H |
|
0 commit comments