workless
workless copied to clipboard
not running delayed jobs on heroku staging server after deploy new changes
Hi,
i'm using workless with delayed_job_active_record. these are in my gem file gem 'rails','3.2.11' gem 'delayed_job_active_record' gem "workless", "~> 1.1.1" gem 'heroku'
my staging server is running on heroku here is url http://gentle-gorge-9319.herokuapp.com/
when i deployed code with new changes workless not fired jobs from delayed job table.
i have this code in my production.rb
config.after_initialize do
Delayed::Job.scaler = :heroku
end
and this as well also not work for me
config.after_initialize do
Delayed::Job.scaler = :heroku_cedar
end
installed gems version on heroku
Using delayed_job (3.0.5)
Using delayed_job_active_record (0.4.1)
Using workless(1.1.2)
Any help?
Thanks
+1 having the same issue. Working great locally, but not on my heroku app on cedar. Tried both of the above as well
have you on your heroku dynos and workers on setting page of your heroku app?
What is the output of the heroku config command for that app (you can censor out secret information)
Have you followed the installation instructions? I've missed setting the APP_NAME, and than workless didn't work...
I have followed all the installation instructions and APP_NAME is set correctly. @kashiftufail may be correct though. I dont have a worker added in my heroku settings because when I add it, it says it will be $35/mo and thats what I was trying to avoid by using this gem. I guess I am still unclear how it works, do i need to add 1 worker initially in heroku settings and then workless will scale it back down to 0 when its not being used? And thank you guys for your quick responses, much appreciated!!
UPDATE: Yup, I added one worker and agreed to the terms then tried again and it worked. And then I went back into my settings and console and saw that workless then shut down the worker and it was back at 0. Excellent! Sorry for my lack of understanding. You guys rock
No problem! Good to know that you must first agree to the conditions before you can even use a worker (didn't know that) but glad this issues was resolved for you!
I am having a similar issue. I added a worker on the Heroku dashboard, and this caused the jobs to fire, and the workers were set back to 0 when finished. However, any subsequent jobs did not fire. I was not presented with any terms to agree to either.
Is this still unresolved?
Is i need to turn on heroku dyno with workless?
Later on i remove this gem from my gem file and turn on heroku dyno.
@kashiftufail i'm not sure what you're asking, can you rephrase?
I am having a similar issue where the heroku workers are not being scaled from zero to one when a new job is added. Would changing the default size of a worker in the Heroku console to 2X cause an issue?
Hey guys I'm having the same problem and tried what travisdahl did (enabling 1 additional worker in heroku dashboard) but after running the job successfully the additional worker is still there.
Gemfile content:
gem 'delayed_job_active_record' gem 'daemons' gem 'workless'
Production.rb content:
config.after_initialize do Delayed::Job.scaler = :heroku_cedar end
Thanks :) alfredo
Quick questions:
- Have you setup the workless required ENV variables?
- Does the log of the application show a notice about workless related errors or that it should have done something?
Thanks for you input!
I'm having this issue, too. One day it was working, then one day it wasn't...
My Gemfile hasn't been touched and I haven't changed any code pertaining to workers and delayed_jobs.
What versión of workless are you using? In my case downgrading did the trick.
Sent from my iPhone
On 29/10/2013, at 11:14, Taylor Brooks [email protected] wrote:
I'm having this issue, too. One day it was working, then one day it wasn't...
My Gemfile hasn't been touched and I haven't changed any code pertaining to workers and delayed_jobs.
— Reply to this email directly or view it on GitHub.
Actually... I just realized that when you change your Heroku password, your HEROKU_API_KEY changes as well.
I reset my ENV variable and workless started working again.
@lostboy and @taylorbrooks I have forked workless and mitigate the aforementioned issue sending a notification to Rollbar when a Heroku api-key or app-name is invalid. This is done through a begin-rescue yielding. In this way I'm at least noticed when something strange occurs, e.g. when the api-key is changed due to a password reset.
For some forgotten or unknown (to me at least) reason my heroku api-key had changed - and that is what had caused workless to stop working. Resetting the HEROKU_API_KEY as suggested worked for me.