Skip to content

Commit

Permalink
Merge pull request #155 from mariux64/fix-154
Browse files Browse the repository at this point in the history
mxqkill: Correct job counts for cancelled groups
  • Loading branch information
donald authored Jan 8, 2024
2 parents 9dda809 + 1255023 commit cd68e5c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mxqkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,9 @@ static int update_job_status_cancelled_by_group(struct mx_mysql *mysql, struct m
assert(g->group_id);

stmt = mx_mysql_statement_prepare(mysql,
"UPDATE mxq_job SET"
" job_status = " status_str(MXQ_JOB_STATUS_CANCELLED)
" WHERE group_id = ?"
" AND job_status IN (" status_str(MXQ_JOB_STATUS_INQ) "," status_str(MXQ_JOB_STATUS_ASSIGNED) ")"
" AND host_hostname = ''"
" AND server_id = ''"
" AND host_pid = 0"
"UPDATE mxq_job SET job_cancelled = TRUE"
" WHERE group_id = ?"
" AND job_status = " status_str(MXQ_JOB_STATUS_INQ)
);
if (!stmt) {
mx_log_err("mx_mysql_statement_prepare(): %s", mx_mysql_error());
Expand Down

0 comments on commit cd68e5c

Please sign in to comment.