I'm building a website with Rails which can let user check if some domains have been registered. The logic is designed like this:
There is a text field on a page let users input some domain names
When user click check button, the input will be post to the server
server get the inputs, create a background task(which will be executed in ...
I need to update a model after delayed_job processes a task on it, e.g:
foo.delay.something
After something is done, I need to update the foo object, what is the best way to achieve this? I was thinking in coding a callback on the Delayed::Backend::ActiveRecord::Job class, but there's should be something cleaner and better to do this. ...
I have a model called Vote that gets changed very frequently (people voting on stuff). I do other analytics after a vote is save, such as interpolating if the voter is male/female, what age etc. This results in updating counters in (adult votes, women votes etc) the same model.
I wonder what's the best way to do this after save process...
Hi guys,
If I need to create recurring tasks in delayed jobs, what is a clean solution? I have an import task that I want to run every 5 minutes, but I don't want to fire up rails/rake in order to tell it to create a Delayed job that can be picked up. If Rails is already running on a system, perhaps I can just create an HTTP request tha...
I'm trying to convert a rails app to jruby on rails. Currently, jruby script/delayed_job run
gives:
/usr/lib/jruby/lib/ruby/gems/1.8/gems/delayed_job-2.0.3/lib/delayed/command.rb:50:in `each_object': ObjectSpace is disabled; each_object will only work with Class, pass -X+O to enable (RuntimeError)
from /usr/lib/jruby/lib/ruby/gems/1...
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 documentation, but couldn't figure out how to execute a manual retry of a job.
...
Stackoverflow has a nifty badge system. One thing I noticed is that badges are not immediately awarded, but sometimes seem to have some type of a delay after I meet the criteria. I've noticed this on some other sites that have badges as well.
Presumably this is because they are using a delayed job that scans periodically to see if any n...
Here is what I have in my enviornment.rb. I understand there have been
issues with restarting because of a bug in the "daemons" gem and that
the ghazel-daemons fixes it. But its not working in my case. I am
using the collectiveidea 2.1.0--pre version of DJ, rails 2.3.5.
config.gem 'delayed_job', :source => 'http://rubygems.org', :versio...
I am using delayed_job for background tasks such as system e-mails and different timed events. I use Delayed::Worker.new.work_off to work off the events in my RSpec tests, but then the test out put gets littered with sh*t like:
[Worker(host:ch.local pid:24307)] RPM Monitoring DJ worker host:ch.local pid:24307
[Worker(host:ch.local pid...
So I'm using Delayed::Job workers (on Heroku) as an after_create callback after a user creates a certain model.
A common use case, though, it turns out, is for users to create something, then immediately delete it (likely because they made a mistake or something).
When this occurs the workers are fired up, but by the time they query ...
I'm running a Rails app on the Heroku Stack (complete with Memcached, DJ Asynchronous workers, MongoDB persistent storage).
Right now we use Twitter Oauth as the only authentication option on our site. (We plan to branch out to FB connect, OpenID, and/or Email/password eventually).
Ruby/Rails apps, as you probably know, don't support c...
i want set the rails plugin devise'reset_password_instructions to delayed_job..but i tried many ways is fail.
i found a function password_controller#creat they have
self.resource = resource_class.send_reset_password_instructions(params[resource_name])
i think the sentence used for send email to reset password.
i want alter it like ...
I have an app that works perfectly on my local machine and am deploying it now. I have the VPS all set up and it pretty much works, as well. My problem comes from not being able to start delayed_job. I do the "ruby script/delayed_job start RAILS_ENV=production" while SSHd to the app and it returns "delayed_job: process with pid 11547 sta...
I have a class in my /lib folder that my delayed_job daemon calls to work on an object of type Foo. If I don't have a "requires 'foo'" in the worker class then it doesn't know what to do with the YAML it gets from the DB and I get the "undefined method" error. Adding in "requires 'foo'" will obviously fix this, which is the usual solutio...
Following the delayed delta guide here (at the bottom) I did everything that the documentation asked. After I did all of the steps there, I ran a rake ts:rebuild and a rake ts:dd and attempted to load my app (development). When it loads, I get:
NameError in CustomersController#index
uninitialized constant ThinkingSphinx::Deltas::Delaye...
#Here is how I have delayed job set up.
Delayed::Worker.backend = :active_record
#Delayed::Worker.logger = Rails.logger
Delayed::Worker.logger = ActiveSupport::BufferedLogger.new("log/
##{Rails.env}_delayed_jobs.log", Rails.logger.level)
Delayed::Worker.logger.auto_flushing = 1
class Delayed::Job
def logger
Delayed::Worker.l...
What sort of tools are available to monitor memory usage in methods running from delayed_job?
I have looked at memorylogic, oink, bleakhouse but they all either seem designed to work with controllers or I am missing something. Any examples of how delayed_job memory leaks (not with the gem itself but the code it is running) are detected ...
I have a Django application.
One of my models looks like this:
class MyModel(models.Model):
def house_cleaning(self):
// cleaning up data of the model instance
Every time when I update an instance of MyModel, I'd need to clean up the data N days later. So I'd like to schedule a job to call
this_instance.house_cleaning()
...
I am planning on using delayed job to run some background analytics. In my initial test I saw tremendous amount of memory usage, so I basically created a very simple task that runs every 2 minutes just to observe how much memory is is being used.
The task is very simple and the analytics_eligbile? method always return false, given where...
I need to query mulitple apis to get certain data for each user. I need to do this as a background task. Now there are a lot of users. And ideally I would like all this to happen in parallel. So I could insert a job of each user/api combination. And say have 4 delayed_job workers process all the jobs.
The problem I am facing with this,...