resque

resque-status and resque-scheduler for delayed jobs

限于喜欢 提交于 2020-01-13 06:18:09
问题 I used resque-scheduler for delay jobs in previous code: Resque.enqueue_in(options[:delay].seconds, self, context) Now I want to include resque-status to do the job but have no idea how they can work together. The latest resque-status source code supports scheduler, as in the source code: https://github.com/quirkey/resque-status/blob/master/lib/resque/plugins/status.rb # Wrapper API to forward a Resque::Job creation API call into a Resque::Plugins::Status call. # This is needed to be used

Gems/Services for autoscaling Heroku's dynos and workers

我的梦境 提交于 2020-01-09 12:51:16
问题 I want to know if there are any good solutions for autoscaling dynos AND workers on Heroku in a production environment (probably a different solution for each of those, as they are pretty unrelated). What are you/companies using, regarding this? I found lots of options, but none of them seem really mature for a production environment. There is Heroscale, which seem to introduce some latency as it does not run locally, and I also heard of some downtime. There are modifications of delayed_jobs,

resque-scheduler fails on job remove

放肆的年华 提交于 2020-01-06 18:01:27
问题 I have used the POC from the Github (queue was missing to I have added it: name = 'send_emails' config = {} config[:class] = 'SendEmail' config[:args] = 'POC email subject' config[:cron] = '* * * * * *' config[:persist] = true config[:queue] = 'new' Resque.set_schedule(name, config) sleep(10) #Try to remove the job Resque.remove_schedule(name) I get the following error: /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:295:in `block in update_schedule': undefined method

resque-scheduler fails on job remove

夙愿已清 提交于 2020-01-06 18:00:00
问题 I have used the POC from the Github (queue was missing to I have added it: name = 'send_emails' config = {} config[:class] = 'SendEmail' config[:args] = 'POC email subject' config[:cron] = '* * * * * *' config[:persist] = true config[:queue] = 'new' Resque.set_schedule(name, config) sleep(10) #Try to remove the job Resque.remove_schedule(name) I get the following error: /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:295:in `block in update_schedule': undefined method

Resque is writing to the development database even when run from a server in production mode

一个人想着一个人 提交于 2020-01-06 08:45:08
问题 When I launch my app in production to test it before rolling out to the server, I noticed that one of my database operations which is called by Resque.enqueue(worker) is performed on the WRONG database! development.sqlite3 instead of production.sqlite3. I'm running both the server and resque with zero configuration files. There must be some way to run redis or resque in the correct environment. defaults: &defaults host: localhost port: 6379 development: <<: *defaults test: <<: *defaults

Resque and Resque_mailer with Devise

拈花ヽ惹草 提交于 2020-01-06 07:53:07
问题 I am implementing background email processing with Resque using the resque_mailer gem (https://github.com/zapnap/resque_mailer). I was able to get it to work for all my emails except the ones sent by Devise. I went through a bunch of SO questions, and blog posts (for instance http://teeparham.posterous.com/send-devise-emails-with-resque) but could not find a way to get it to work. What are the precise steps to follow to get resque_mailer to work with Devise? 回答1: I'd take a look at devise

Parallel background tasks on single worker dyno

假装没事ソ 提交于 2020-01-05 11:09:27
问题 We've got a Rails app where certain requests trigger long-running tasks on a worker dyno with delayed_job, while the front-end polls until it receives a result. Our traffic is small but growing, and the tasks generally take only a few seconds to complete, but can take up to a minute. Right now a single web and worker dyno each should be sufficient to handle our load. The problem is, the delayed_job queue won't process jobs in parallel, so a longer task ends up holding up the tasks behind it.

Rails, Heroku, and Resque: Long Running Background Job Optimization

▼魔方 西西 提交于 2020-01-05 07:48:14
问题 We're building a tinder style app that allows users to "like" or "dislike" events. Each event has about 100 keywords associated with it. When a user "likes" or "dislikes" and event, we associate that event's keywords with the user. Users can quickly get thousands of keywords. We use through tables to associate users and events to keywords (event_keywords and user_keywords). The through table has an additional column relevance_score which is a float (e.g. a keyword can be 0.1 if it's very

apn_sender and Rails 3

血红的双手。 提交于 2020-01-02 05:22:27
问题 I have a project that needs to send notifications from server to device. I don't know how and where to start (create table first or other), because I'm new to Ruby on Rails. I've follow the apn_sender tutorial but it won't work and always errors out on start. Is there any full tutorial to create apn_sender for Rails 3? Thanks 回答1: Rails 3 and apn_sender I too have been working on the apn_sender problem, because I like that the Apple Push Notification support seems pretty robust. However, the

Resque Mysql2::Error: User has exceeded the 'max_user_connections' resource (current value: 10)

和自甴很熟 提交于 2019-12-30 10:59:07
问题 I am running Resque on Heroku, and my database is ClearDB. I am getting this error: "Mysql2::Error: User 'bdb2aedbee2c38' has exceeded the 'max_user_connections' resource (current value: 10): SHOW FULL FIELDS FROM projects " That error is coming from my Resque admin of my Heroku app. How can I figure out how many connections Resque is making to ClearDB? How can I tell ClearDB to either allow more connections, or tell Resque to create less? Does "current value: 10" refer to how many