resque

How to destroy jobs enqueued by resque workers?

…衆ロ難τιáo~ 提交于 2019-12-02 14:39:11
I'm using Resque on a rails-3 project to handle jobs that are scheduled to run every 5 minutes. I recently did something that snowballed the creation of these jobs and the stack has hit over 1000 jobs. I fixed the issue that caused that many jobs to be queued and now the problem I have is that the jobs created by the bug are still there and therefore It becomes difficult to test something since a job is added to a queue with 1000+ jobs. I can't seem to stop these jobs. I have tried removing the queue from the redis-cli using the flushall command but it didn't work. Am I missing something? coz

Are spies an appropriate approach to see if Resque methods are being fired?

戏子无情 提交于 2019-12-02 12:57:56
While simple coverage is reporting this as 100% covered I am not satisfied. The spec marked as focus I would like to confirm that all of the Resque methods are being fired. Is a spy or a double the right approach for this? Spec describe 'resque tasks' do include_context 'rake' let(:task_paths) { ['tasks/resque'] } before do invoke_task.reenable end # rubocop:disable all describe 'resque' do context ':setup' do let(:task_name) { 'resque:setup' } it 'works' do invoke_task.invoke expect(Resque.logger.level).to eq(1) end end context ':scheduler_setup' do let(:task_name) { 'resque:scheduler_setup'

Knowing when resque worker had completed job

混江龙づ霸主 提交于 2019-12-02 09:09:23
I am performing some job with Resque-worker (5 workers). Now, when this job is completed/done I want to trigger another worker which processes the data previous worker stored in db. What would be the most appropriate method of doing this? I'm not sure if this is of any help, but have you had a look at the resque-status gem? That way you can track a given jobs' status, to see when it is completed. But I'm affraid there are no auto-trigger functionality, to start new workers. 来源: https://stackoverflow.com/questions/8383259/knowing-when-resque-worker-had-completed-job

Using Resque, Puma and Scheduler together on Heroku

那年仲夏 提交于 2019-12-02 00:24:26
After reviewing numerous guides I would like to confirm my setup. Right now my procfile looks like: web: bundle exec puma -C config/puma.rb config.ru resque: TERM_CHILD=1 RESQUE_TERM_TIMEOUT=10 QUEUES=* bundle exec rake resque:work worker: bundle exec rake resque:work COUNT=1 QUEUE=* scheduler: bundle exec rake resque:scheduler ...and in Heroku : ...and my rake resque setup task : require 'resque' require 'resque/tasks' require 'resque/scheduler/tasks' # http://jademind.com/blog/posts/enable-immediate-log-messages-of-resque-workers/ namespace :resque do desc 'Initialize Resque environment'

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

半世苍凉 提交于 2019-12-01 09:14:36
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 connections ClearDB is allowing, or is this how many current connections Resque is trying to make? Thanks! Your

How can I run Rails background jobs with Resque on AWS Elastic Beanstalk?

早过忘川 提交于 2019-11-30 23:37:11
I am running my rails app on the AWS Elastic Beanstalk platform, which is running a single EC2 instance with Auto Scaling & Elastic Load Balancing. I'm wondering how to run resque , delayed_job or sidekicq or some other solution for background jobs on Elastic Beanstalk. What are the possible options for background jobs on Elastic Beanstalk? Best way to start/stop/restart background jobs could be via init scripts for these tasks. You could have these init scripts triggered as services when instances are launched. More about Customizing ElasticBeanstalk containers for services here . Once done,

Resque-Scheduler not working with ActiveJob in Rails 4.2

北慕城南 提交于 2019-11-30 15:13:36
问题 Has anyone been able to get scheduled jobs to work in Rails 4.2? I am using resque, and I am attempting to use resque-scheduler to schedule jobs. I have a schedule that get loaded and the scheduler runs, and even looks like it is running the jobs but it doesn't do anything. resque-scheduler: [INFO] 2014-09-16T01:54:25-07:00: Starting resque-scheduler: [INFO] 2014-09-16T01:54:25-07:00: Loading Schedule resque-scheduler: [INFO] 2014-09-16T01:54:25-07:00: Scheduling friends resque-scheduler:

deploying redis to heroku unable to connect

只愿长相守 提交于 2019-11-30 12:00:13
问题 ive been trying to get resque to work with heroku. i can successfully get it to work in development mode, however when i try pushing to heroku i get Errno::ECONNREFUSED (Connection refused - Unable to connect to Redis on 127.0.0.1:6379): i then read and followed http://blog.redistogo.com/2010/07/26/resque-with-redis-to-go/ i put the configurations listed in the site but got the following error SocketError (getaddrinfo: nodename nor servname provided, or not known): i put in my initializers

Rescue : Connection refused - Unable to connect to Redis on localhost:6379

给你一囗甜甜゛ 提交于 2019-11-30 08:08:03
I have followed the instructions to install resque, but now when I try to spawn a worker with this command I get a connection error: $ QUEUE=mailer rake environment resque:work --trace this is the error that I get: Connection refused - Unable to connect to Redis on localhost:6379 Have you verified redis-server is running? Please don't ask me to dissect the following command, but in a terminal you can type: ps aux | grep redis You should then see something like: redis 13319 0.0 0.0 2884 1056 ? Ss 10:54 0:00 /usr/bin/redis-server /etc/redis/redis.conf If it's not running, I recommend issuing the

How can I run Rails background jobs with Resque on AWS Elastic Beanstalk?

孤人 提交于 2019-11-30 05:44:43
问题 I am running my rails app on the AWS Elastic Beanstalk platform, which is running a single EC2 instance with Auto Scaling & Elastic Load Balancing. I'm wondering how to run resque, delayed_job or sidekicq or some other solution for background jobs on Elastic Beanstalk. What are the possible options for background jobs on Elastic Beanstalk? 回答1: Best way to start/stop/restart background jobs could be via init scripts for these tasks. You could have these init scripts triggered as services when