You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Polling a sequential schedule: 500 on a deferred job, and on the wrap-up job's id for a sensor's schedule #2874
Two crashes when following up on POST /assets/<id>/schedules/trigger with "sequential": true, on main (8d59a64c9, rq 2.12):
GET /api/v3_0/jobs/<id> for a job that is deferred answers 500: AttributeError: 'Job' object has no attribute 'status', in job_status_description (flexmeasures/data/services/utils.py), which builds waiting for {preferred_job.status} job. RQ 2 has get_status() instead. The wrap-up job of a sequential schedule is deferred until its last subjob has run, so a client that polls the returned job id early always gets this 500.
GET /api/v3_0/sensors/<id>/schedules/<uuid>, with the wrap-up job's id (which is what the trigger endpoint returns), on a chain that finished, answers 500: KeyError: 'start' at schedule_start = job.kwargs["start"] in SensorAPI.get_schedule. The wrap-up job has no kwargs. It could resolve the subjob for that sensor from the wrap-up job's argument (the list of subjob ids), or answer with a clear 400.
Found while reviewing #2409, which makes a failed chain end in a terminal state (and answers this endpoint with UNKNOWN_SCHEDULE for a failed chain).
Activity