fix(scheduler): allow 'starting' and 'stopping' statuses in DB
The scheduler tick loop updates a schedule's status to 'starting' and 'stopping' in the database while it initiates the API calls to the recorder container. The original CHECK constraint in recorder_schedules rejected these two statuses, causing the scheduler to crash on constraint violation and never start the job.
This commit is contained in:
parent
01211fef7a
commit
07d1fc9e72
1 changed files with 7 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
-- Add 'starting' and 'stopping' to recorder_schedules status check constraint
|
||||
|
||||
ALTER TABLE recorder_schedules DROP CONSTRAINT recorder_schedules_status_check;
|
||||
|
||||
ALTER TABLE recorder_schedules
|
||||
ADD CONSTRAINT recorder_schedules_status_check
|
||||
CHECK (status IN ('pending','running','completed','failed','cancelled','starting','stopping'));
|
||||
Loading…
Reference in a new issue