Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mysql/trigger: Remove handling host_slots change
this should never change.
  • Loading branch information
mariux committed Nov 27, 2015
1 parent d3aa389 commit 30ffc36
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions mysql/create_trigger.sql
Expand Up @@ -71,19 +71,9 @@ CREATE TRIGGER mxq_update_job BEFORE UPDATE ON mxq_job
SET NEW.date_start = NOW();

UPDATE mxq_group SET
group_slots_running = group_slots_running - OLD.host_slots+NEW.host_slots,
group_sum_startime = group_sum_startime + UNIX_TIMESTAMP(NEW.date_start) * OLD.host_slots
WHERE group_id = NEW.group_id;

IF OLD.host_slots != NEW.host_slots THEN
IF NEW.daemon_id != 0 THEN
UPDATE mxq_daemon SET
mtime = NULL,
daemon_slots_running = daemon_slots_running + NEW.host_slots - OLD.host_slots
WHERE daemon_id = NEW.daemon_id;
END IF;
END IF;

-- LOADED(150) | RUNNING(200) | UNKNOWN_RUN(250) | EXTRUNNING(300) | STOPPED(350) | KILLING(399) -> KILLED(400) | FAILED(750)
ELSEIF NEW.job_status IN (400, 750) AND OLD.job_status IN (150, 200, 250, 300, 350, 399) THEN

Expand Down

0 comments on commit 30ffc36

Please sign in to comment.