I'm using delayed job for the first time, and it seems to be working fine. I started to tail my production log to fix another issue, and found that delayed job is constantly updating the production log with debug code. Is this normal, and can I turn it off?
[2015-06-14T16:05:35.983383 #24767] DEBUG -- : SQL (0.5ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:35', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:24767' WHERE ((run_at <= '2015-06-14 16:05:35.980823' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:35.980900') OR locked_by = 'delayed_job host:localhost pid:24767') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:36.621786 #2864] DEBUG -- : SQL (0.4ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:36', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:2864' WHERE ((run_at <= '2015-06-14 16:05:36.619634' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:36.619699') OR locked_by = 'delayed_job host:localhost pid:2864') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:38.803207 #32414] DEBUG -- : SQL (0.5ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:38', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:32414' WHERE ((run_at <= '2015-06-14 16:05:38.801308' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:38.801378') OR locked_by = 'delayed_job host:localhost pid:32414') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:40.683621 #13040] DEBUG -- : SQL (0.4ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:40', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:13040' WHERE ((run_at <= '2015-06-14 16:05:40.681734' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:40.681791') OR locked_by = 'delayed_job host:localhost pid:13040') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:40.986701 #24767] DEBUG -- : SQL (0.6ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:40', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:24767' WHERE ((run_at <= '2015-06-14 16:05:40.984123' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:40.984213') OR locked_by = 'delayed_job host:localhost pid:24767') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:41.624208 #2864] DEBUG -- : SQL (0.4ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:41', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:2864' WHERE ((run_at <= '2015-06-14 16:05:41.622350' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:41.622408') OR locked_by = 'delayed_job host:localhost pid:2864') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:43.805954 #32414] DEBUG -- : SQL (0.5ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:43', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:32414' WHERE ((run_at <= '2015-06-14 16:05:43.803737' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:43.803805') OR locked_by = 'delayed_job host:localhost pid:32414') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:45.685733 #13040] DEBUG -- : SQL (0.4ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:45', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:13040' WHERE ((run_at <= '2015-06-14 16:05:45.684133' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:45.684179') OR locked_by = 'delayed_job host:localhost pid:13040') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:45.989291 #24767] DEBUG -- : SQL (0.5ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2015-06-14 16:05:45', `delayed_jobs`.`locked_by` = 'delayed_job host:localhost pid:24767' WHERE ((run_at <= '2015-06-14 16:05:45.987317' AND (locked_at IS NULL OR locked_at < '2015-06-14 12:05:45.987369') OR locked_by = 'delayed_job host:localhost pid:24767') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
D, [2015-06-14T16:05:46.616535 #24767] DEBUG -- : (0.3ms) SELECT COUNT(*) FROM `delayed_jobs` WHERE (failed_at is not NULL)
D, [2015-06-14T16:05:46.617620 #24767] DEBUG -- : (0.3ms) SELECT COUNT(*) FROM `delayed_jobs` WHERE (locked_by is not NULL)
D, [2015-06-14T16:05:46.619464 #24767] DEBUG -- : (0.4ms) SELECT COUNT(*) AS count_all, priority AS priority FROM `delayed_jobs` WHERE (run_at <= '2015-06-14 16:05:46.618279' and failed_at is NULL) GROUP BY `delayed_jobs`.`priority`
D,
The Delayed Job table is usually empty, and jobs are quickly processed.
It is normal, you must have set
log_level
inconfig/environments/production.rb
to:debug
.Changing it to
:info
will not update production log with delayed job's debug comments.