Skip to content

The job runner does not understand cancelled jobs #531

@sbidoul

Description

@sbidoul

Module

queue_job

Describe the bug

Since #347, jobs have a cancelled state.
However the job runner does not understand this state.

# state transitions
if not state or state == DONE:
job.channel.set_done(job)
elif state == PENDING:
job.channel.set_pending(job)
elif state in (ENQUEUED, STARTED):
job.channel.set_running(job)
elif state == FAILED:
job.channel.set_failed(job)
elif state == WAIT_DEPENDENCIES:
# wait until all parent jobs are done
pass
else:
_logger.error("unexpected state %s for job %s", state, job)

This may lead to cancelled job filling up channels forever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugno staleUse this label to prevent the automated stale action from closing this PR/Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions