-----------------
- Support a job being linked properly to multiple schedule and listener sources such
that provenance is properly tracked on retries.
- Add a new ``CANCELED`` job state that can be used to manually mark any pending,
failed, or lost jobs as canceled. Jobs do not enter this state automatically - theyt
must be manually marked but will be useful to disambiguate failed from canceled.
- [breaking] ``job.schedule_id`` is removed from the job object passed to background
workers.
- [model migration] Moved the ``schedule_id`` and ``listener_id`` foreign keys from
the ``Job`` table to many-to-many link tables to support tracking the source properly
when collapsing occurs. Possible migration::
insert into mq_job_schedule_link (job_id, schedule_id)
select id, schedule_id from mq_job where schedule_id is not null;
insert into mq_job_listener_link (job_id, listener_id)
select id, listener_id from mq_job where listener_id is not null;
alter table mq_job drop column schedule_id;
alter table mq_job drop column listener_id;
- [model migration] Add a new ``CANCELED`` state to the ``mq_job_state`` enum.
Possible migration::
alter type mq_job_state add value 'canceled';