delayed-job

delayed job problem in rails.

My controller data_files_controller.rb def upload_balances DataFile.load_balances(params) end My model data_file.rb def self.load_balances(params) # Pull the file out of the http request, write it to file system name = params['Filename'] directory = "public/uploads" errors_table_name = "snapshot_errors" upload_file = File.join(...

File read fails when using Delayed Job

How to check that my params['Filedata'] is corrupted or not? I have function it's reading file from params['Filedata'] and writing it to the other file. File.open(upload_file, "wb") { |f| f.write(params['Filedata'].read) } this line working fine for me.. But when i am calling this function with delayed job function send_later than I...

problem with ruby script/delayed_job start. delayed_job and daemon on windows.

gettting this error. pid-file for killed process 8600 found (C:/cyncabc/tmp/pids/delayed_job.pid), deleting. c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/daemonize.rb:103:in `fork': fork() function is unimplemented on this machine (NotImplementedError) from c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/da...

rake jobs:work working fine. problem with script/delayed_job start.

I am calling function with LoadData.send_later(:test). LoadData is my class and test is my method. It's working fine while i am running rake jobs:work. But when i am running script/delayed_job start or run that time delayed_job.log shows error like TEastern Daylight Time: *** Starting job worker delayed_job host:KShah pid:5968 TEaste...

Active Mailer doesn't have the application helpers when used with delayed_job v.2

So if I try sending an email with action mailer directly, I can use all application helpers like url_for, content_for etc, but when I try to do the exact same action [sending email] with delayed_job [send_later] I getting a delayed job fail, of undefined function content_for etc, so it is like no helpers are loaded in my ActionMailer. I ...

How to use Delayed::Job in an after_save callback?

I want to run the method process_images asynchronously after_save with Delayed::Job. However, when I try: after_save lambda { send_later(:process_images) } I get a NoMethodError: You have a nil object when you didn't expect it!. (self.send_later(:process_images) work either) ...

Starting delayed_job at startup with rails.

I want to start script/delayed_job start on my production when i will start my rails server. Is there anyway i can do that? EDIT:: I have added this line to my config/initializers/delayed_job.rb . Delayed::Worker.new.start But my delayed job server is not starting when i am running my rails applicaiton. Is there any other solution...

fetch start and end time for every job with delayed_job.

Is there any way i can fetch start and time for my every job. I am using delayed_job. ...

monit with delayed_job.

if my delayed_job server broke than monit will automatically restart the delayed_job server again or not? ...

monit with delayed_job set up.

I have done all this modification to setup monit and delayed_job. I have create one file delayed_job.monitrc in my app/current/config. delayed_job.monitrc check process delayed_job with pidfile /home/sysadmin/app/current/shared/pids/delayed_job.pid start program = "/usr/bin/env RAILS_ENV=production /home/sysadmin/app/current/scrip...

cron tab to restart my delayed_job server.

I want to create a cront tab to restart my delayed_job server if it breaks. how may check that my delayed_job server is running or not with ps command? how may i create a cron tab to check this thing work? Like if my server break than cron tab will restart it. I want to set cront tab to check it every 5 minute. ...

Delayed Jobs leaking memory?

I'm using collectiveidea's delayed_job with my Ruby on Rails app (v2.3.8), and running about 40 background jobs with it on an 8GB RAM Slicehost machine (Ubuntu 10.04 LTS, Apache 2). Let's say I ssh into my server with no workers running. When I do free -m, I'm see I'm generally using about 1GB of RAM out of 8. Then after starting the w...

DelayedJob and `master_slave_adapter`; losing the master connection

We have a Rails application that is running in a MySQL master-slave set-up for a while now, using the master_slave_adapter plugin. Recently, there was a need for background processing of long running tasks. So we settled on DelayedJob. DelayedJob's table/model uses the same master-slave adapter. And it keeps the slave connection alive b...

drb problem? ringy-dingy won't answer...

The following code works fine as long as I don't try to run it through the distributed server. It doesn't get there... It runs fine out of delayed_job, runs fine if called directly. But if 'distrib' is true (the default) it runs right up to the call to the server and right past it without getting to the server or raising any errors. Am...

Delayed_job custom failing assertions?

Hey all, I'm using delayed_job for a priority queue. I was wondering how do i define what a failed job is? Thanks. ...

Rails3 Beta4 Devise Delayed_job configuration

Hi everyone (: I want to use delayed_job to send email in backend, this is /config/initializers/setup_mail.rb ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => DOMAIN, :user_name => USERNAME, :password ...

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 worker. Indeed, after launching "rake jobs:work RAILS_ENV=test" in a first terminal, and after runnin...

Delayed Job on Heroku

I have a Rails application hosted on Heroku that requires a weekly data import. The task is performed by administrators and takes about 1-2 minutes to run (compute time). On Heroku, jobs that require more than 30 seconds time out. Heroku recommends job queues - however paying $36.00 per month (price of one worker) for 8 minutes of comput...

Is there anything like DelayedJob, but not use Database

I'm building a web site with Rails, which will do something in the background. I don't want to use DelayedJob, because it needs a database. What I wan't to do is simple: get some data from another site, save the response in the memory, and keep it for 10 minutes. Is there any tools can do this? ...

Some basic questions about 'delayed_job'

I'm trying delayed_job now, and have some questions. From the http://github.com/collectiveidea/delayed_job page, I can see some information: Workers can be running on any computer, as long as they have access to the database and their clock is in sync. Keep in mind that each worker will check the database at least every 5 ...