Skip to content

0.31.0 #149

Merged
merged 20 commits into from
Dec 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
sql: Add job_cancelled column
When mxqkill is used against a running job, it needs to communicate the
fact that the job should be aborted to the daemon handling it. This
commit adds a boolean (TINYINT) column `job_cancelled` to `mxq_job` for
this purpose.

Other options such as overloading `job_status`, utilizing a bit of
job_flags, and using MySQL BIT or SET data types were considered but
discarded to avoid code complexity.
donald committed Dec 29, 2023
commit 3b778deb8729fa3d104681e3f82b1b814ff813d5
2 changes: 2 additions & 0 deletions mysql/create_tables.sql
Original file line number Diff line number Diff line change
@@ -72,6 +72,8 @@ CREATE TABLE IF NOT EXISTS mxq_job (
job_status INT2 UNSIGNED NOT NULL DEFAULT 0,
job_priority INT2 UNSIGNED NOT NULL DEFAULT 127,

job_cancelled BOOLEAN NOT NULL DEFAULT FALSE,

group_id INT8 UNSIGNED NOT NULL,

job_workdir VARCHAR(4096) NOT NULL,
5 changes: 5 additions & 0 deletions mysql/migrate_015_add_job_cancelled.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ALTER TABLE mxq_job
ADD COLUMN
job_cancelled BOOLEAN NOT NULL DEFAULT FALSE
AFTER
job_priority;