I am using delayed jobs like Something.delay.some_function()
I am running [Foreman][1] Procfile to start both rails server and a worker
web: bundle exec rails s
worker: bundle exec rake jobs:work
And all the time I see this in my terminal, though I always run rake jobs:clear if something bad happened during the job. And now I have no delayd jobs
irb(main):010:0> Delayed::Job.all
Delayed::Backend::ActiveRecord::Job Load (0.7ms) SELECT "delayed_jobs".* FROM "delayed_jobs"
=> []
but I still see those strange things in my terminal. What is this and how can I get rid of it?
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (0.1ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:52.491892' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:52.492124') OR locked_by = 'host:kik-VirtualBox pid:5010') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (0.5ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:52.706307' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:52.706499') OR locked_by = 'host:kik-VirtualBox pid:4654') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (0.4ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:52.712781' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:52.713010') OR locked_by = 'host:kik-VirtualBox pid:4313') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (4.8ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:52.710021' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:52.710261') OR locked_by = 'host:kik-VirtualBox pid:4622') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (0.5ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:54.530083' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:54.530318') OR locked_by = 'host:kik-VirtualBox pid:5307') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (0.6ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:57.497068' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:57.497275') OR locked_by = 'host:kik-VirtualBox pid:5010') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (0.5ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:57.723823' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:57.724071') OR locked_by = 'host:kik-VirtualBox pid:4313') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (0.4ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:57.722732' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:57.722934') OR locked_by = 'host:kik-VirtualBox pid:4654') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (10.0ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:57.718190' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:57.718443') OR locked_by = 'host:kik-VirtualBox pid:4622') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
11:47:01 rails_s.1 | Delayed::Backend::ActiveRecord::Job Load (0.5ms) SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2013-06-14 09:46:59.534770' AND (locked_at IS NULL OR locked_at < '2013-06-14 05:46:59.535003') OR locked_by = 'host:kik-VirtualBox pid:5307') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
Thanks in advance
Delayed Job checks if there are new tasks for it every once in a while. As long as rake jobs:work
is running you'll be seeing those logs. In short - everything is ok!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With