Nextdoor / ndscheduler

A flexible python library for building your own cron-like system, with REST APIs and a Web UI.
BSD 2-Clause "Simplified" License
1.09k stars 201 forks source link

update executions in status 'running' at start-up #90

Closed palto42 closed 3 years ago

palto42 commented 4 years ago

This PR fixes the issue raised in #86. At start-up the executions in the database are searched for entries in state "scheduled", "running", or "stopping" which are assumed to be left-overs caused by previously interrupted ndscheduler. The status of this entries is set to "failed" and the result is set to { "error": "interrupted"}.