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.
7 lines
339 B
SQL
7 lines
339 B
SQL
-- 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'));
|