delayed-job

Solution for background jobs on Heroku?

孤街醉人 提交于 2020-02-04 05:04:47
问题 I've used Delayed Job on Heroku's older stacks (Aspen and Bamboo), but with their new(ish) Cedar stack, I'd like to try something more efficient. The specific background jobs I'm performing are API calls to different carriers (UPS, FedEx, USPS, etc etc) and I typically am processing thousands every hour. I need to be able to process jobs concurrently to get through the queue quickly. On top of that, I'd like to try to reduce costs. On the previous stacks where I've been using Delayed Job, I

Solution for background jobs on Heroku?

拟墨画扇 提交于 2020-02-04 05:04:41
问题 I've used Delayed Job on Heroku's older stacks (Aspen and Bamboo), but with their new(ish) Cedar stack, I'd like to try something more efficient. The specific background jobs I'm performing are API calls to different carriers (UPS, FedEx, USPS, etc etc) and I typically am processing thousands every hour. I need to be able to process jobs concurrently to get through the queue quickly. On top of that, I'd like to try to reduce costs. On the previous stacks where I've been using Delayed Job, I

Heroku & Delayed Job - Autoscale Branch - RestClient::ResourceNotFound

别来无恙 提交于 2020-01-30 08:32:16
问题 SomeController#update (RestClient::ResourceNotFound) "Resource Not Found" I'm receiving this error (where previously I was not) while trying to enqueue delayed jobs using the autoscale branch of DelayedJob. This does not occur with a none autoscale branch but I'm at a loss to pinpoint what the problem is. If anyone is experiencing the same or can point me toward a likely cause I'd be grateful for advice. 回答1: Just a guess... Is it possible the ResourceNotFound is occurring because the heroku

Processing orders after minimum order met - Rails 3

与世无争的帅哥 提交于 2020-01-23 21:56:07
问题 My app has deals where orders are made once a minimum order amount is met. Currently I have setup orders that that orders are placed right after the order is submitted which is all working. Now I need to change the process so that orders are processed once the minimum order number for the deal is met. Should I use delayed_job for this or maybe a cron process? Here is the process I was thinking of following. Delaying Orders Until Orders minimum is met Find deals that are still active Then find

uninitialized constant Delayed::Job

风格不统一 提交于 2020-01-23 04:21:48
问题 I've added the delayed_job gem to my gemfile and installed correctly but when I try to run the following line: Delayed::Job.enqueue do_it(), 0, 1.minutes.from_now.getutc I get the error 'uninitialized constant Delayed::Job' Can somebody explain what i need to do here? I've tried running 'rake jobs:work' beforehand but it also returns the 'uninitialized constant Delayed::Job' error. Additionally, I've added "require 'delayed_job'" to the file (application.rb) without much luck. 回答1: Did you

Bundler with Capistrano doesn't generate a binary for DelayedJob

放肆的年华 提交于 2020-01-22 19:39:38
问题 I'm using Bundler for a Rails app deployed by Capistrano. I'm trying to add the DelayedJob gem, but the bin/delayed_job file is missing from the remote server after I do a deploy. It exists on my local machine. I tried manually creating it with bundle binstubs delayed_job but it fails with: There are no executables for the gem delayed_job. What am I missing here? The gems in question are: Bundler 1.3.5, Capistrano 3.1.0, DelayedJob 4.0.0, Rails 4.0.2 EDIT: Here is my full Gemfile: http:/

redirect_url is missing in email instructions sent to the user for password reset

戏子无情 提交于 2020-01-15 23:57:10
问题 I am trying to build api urls for password reset via. devise_token_auth gem. As per the usage mentioned here, the POST request for /api/v1/auth/password needs params email and redirect_url . The user matching the email param will be sent instructions on how to reset their password. redirect_url is the url to which the user will be redirected after visiting the link contained in the email. However, I am getting the following URL in the email for password reset, in which the param redirect_url

delayed_jobs save completed jobs

五迷三道 提交于 2020-01-13 08:37:29
问题 Is there a parameter I can pass to delayed_job that will prevent it from deleting completed jobs from the delayed_jobs table? kind of like the destroy_failed_jobs but for completed jobs any ideas? 回答1: It doesn't appear so. From the README: https://github.com/tobi/delayed_job By default, it will delete failed jobs (and it always deletes successful jobs). If you want to keep failed jobs, set Delayed::Job.destroy_failed_jobs = false. The failed jobs will be marked with non-null failed_at. You

starting multiple workers in Procfile (development environment vs Heroku)

霸气de小男生 提交于 2020-01-13 03:03:39
问题 I have a simple Procfile that reads: web: bundle exec rails server thin -p $PORT worker: bundle exec rake jobs:work On Heroku, this will launch N worker tasks, where N is whatever I've scaled it to be. On my development system, $ foreman start will only launch one worker task. If I want to launch three workers, I need a Procfile that looks like: web: bundle exec rails server thin -p $PORT worker: bundle exec rake jobs:work worker: bundle exec rake jobs:work worker: bundle exec rake jobs:work

starting multiple workers in Procfile (development environment vs Heroku)

半世苍凉 提交于 2020-01-13 03:03:37
问题 I have a simple Procfile that reads: web: bundle exec rails server thin -p $PORT worker: bundle exec rake jobs:work On Heroku, this will launch N worker tasks, where N is whatever I've scaled it to be. On my development system, $ foreman start will only launch one worker task. If I want to launch three workers, I need a Procfile that looks like: web: bundle exec rails server thin -p $PORT worker: bundle exec rake jobs:work worker: bundle exec rake jobs:work worker: bundle exec rake jobs:work