Questions tagged [delayed-job]

A Ruby library to queue and defer processing of slow methods like sending email and image resizing.

Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background.

It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks. Amongst those tasks are: •sending massive newsletters •image resizing •http downloads •updating smart collections •updating solr, our search server, after product changes •batch imports •spam checks

1600 questions
99
votes
3 answers

How do you tell a specific Delayed::Job to run in console?

For some reason, Delayed::Job's has decided to queue up but not excecute anything even though I've restarted it several times, even kill -9'd it and restarted it. It won't run any jobs. Can I , in /console, specify a specific job and tell it to…
Trip
  • 25,831
  • 41
  • 146
  • 260
77
votes
13 answers

How to test ActionMailer deliver_later with rspec

trying to upgrade to Rails 4.2, using delayed_job_active_record. I've not set the delayed_job backend for test environment as thought that way jobs would execute straight away. I'm trying to test the new 'deliver_later' method with RSpec, but I'm…
bobomoreno
  • 2,668
  • 4
  • 20
  • 41
74
votes
13 answers

How to monitor delayed_job with monit

Are there any examples on the web of how to monitor delayed_job with Monit? Everything I can find uses God, but I refuse to use God since long running processes in Ruby generally suck. (The most current post in the God mailing list? God Memory…
Luke Francl
  • 29,241
  • 18
  • 67
  • 91
72
votes
13 answers

getaddrinfo: nodename nor servname provided, or not known

I have a Ruby on Rails application that I am deploying on a computer running Mac OS X 10.6. The code where the problem arises is run by a delayed_job. The problem only occurs when it is run through delayed_job. If I run it within a console (rails…
ChronoPositron
  • 1,388
  • 2
  • 9
  • 13
72
votes
9 answers

Manually Retry Job in Delayed_job

Delayed::Job's auto-retry feature is great, but there's a job that I want to manually retry now. Is there a method I can call on the job itself like... Delayed::Job.all[0].perform or run, or something. I tried a few things, and combed the…
Michael Waxman
  • 1,715
  • 3
  • 16
  • 32
69
votes
2 answers

How can I see the delayed job queue?

I wonder if I succeeded to get Delayed::Job working. Can't see jobs in the delayed_jobs table. Is that normal? Is there any other ways too see job queue?
knotito
  • 1,293
  • 1
  • 11
  • 17
43
votes
1 answer

Logging in delayed_job?

I can't get any log output from delayed_job, and I'm not sure my jobs are starting. Here's my Procfile: web: bundle exec rails server worker: bundle exec rake jobs:work worker: bundle exec clockwork app/clock.rb And here's the job: class…
Stefan Kendall
  • 61,898
  • 63
  • 233
  • 391
39
votes
4 answers

How to deploy resque workers in production?

The GitHub guys recently released their background processing app which uses Redis: http://github.com/defunkt/resque http://github.com/blog/542-introducing-resque I have it working locally, but I'm struggling to get it working in production. Has…
Brian Armstrong
  • 19,149
  • 14
  • 109
  • 140
37
votes
4 answers

How to cancel scheduled job with delayed_job in Rails?

I am scheduling a job to run in say, 10 minutes. How to properly cancel this particular job without using any kind of dirty extra fields in model and so on. Is there any call to remove particular job, or jobs related to specific model, instance,…
mdrozdziel
  • 5,418
  • 5
  • 36
  • 53
35
votes
7 answers

How to resolve deserialization error in delayed job?

I am trying to use DelayedJob and the job is failing, giving the following error in the database: {Delayed::DeserializationError /Library/Ruby/Gems/1.8/gems/delayed_job-2.1.3/lib/delayed/serialization/active_record.rb:7:in…
deruse
  • 2,731
  • 7
  • 37
  • 59
35
votes
4 answers

Delayed Job not processed in rspec

I am trying to run rspecs for a custom delayed job (GetPage::GetPageJob), but I have a problem. When I run them, the jobs are well enqueued (that is to say, well inserted in the delayed_jobs table), but they are not processed by the job…
Jerome
  • 359
  • 1
  • 3
  • 4
34
votes
3 answers

Destroying all delayed job in rails

I am using collectiveidea for rails 2.3.8. I am creating array of delayed jobs to perform some tasks, after some time I want to destroy all the delayed jobs which are running. If anyone know the way to do this please help me.
Rahul Tapali
  • 8,989
  • 6
  • 27
  • 44
34
votes
5 answers

Starting delayed_job at startup

I'm using delayed_job with capistrano and would like a way to start delayed_job on startup of the web application using the 'script/delayed_job start'. This way capistrano can restart it on deploy. If the server gets rebooted then my delayed_jobs…
map7
  • 4,722
  • 5
  • 55
  • 116
33
votes
6 answers

polling with delayed_job

I have a process which takes generally a few seconds to complete so I'm trying to use delayed_job to handle it asynchronously. The job itself works fine, my question is how to go about polling the job to find out if it's done. I can get an id from…
28
votes
2 answers

Rspec testing delayed_job

I have some complex, long-running delayed_job processes in my application. I am using Rspec to test individual methods and classes used in the processes, but I would also like to perform many of end-to-end background jobs, with different test data.…
ardochhigh
  • 5,116
  • 7
  • 50
  • 83
1
2 3
99 100