cylc-flow
cylc-flow copied to clipboard
Inconsistent timings in `job.status` vs `task_jobs` DB table
Description
For a workflow with a polling task, we have seen inconsistencies between the job.status file and the DB:
| Time | job.status | db (task_jobs) |
|---|---|---|
| submit time | N/A[^1] | 16:27:38 |
| submit exit time | 16:27:41 | 16:27:40 |
| init / run time | 16:27:51 | 16:29:51 |
| exit time | 16:29:51 | 16:29:51 |
[^1]: I think the "submit time" is when the scheduler started the submission process, whereas the "submit exit time" is when the job was actually submitted or submit-failed in the job runner.
When using the poll comms method, if the started output is missed because it last polled as submitted and then next polled as succeeded, the started time is wrongly reported as the time of polling the success
https://github.com/cylc/cylc-flow/blob/a721f852f75c20e39e5f4ebba303f9af56c89ed9/cylc/flow/task_events_mgr.py#L1354-L1364