sidekiq

Can multiple sidekiq instances process the same queue

佐手、 提交于 2019-12-05 09:28:30
问题 I'm not familiar with the internals of Sidekiq and am wondering if it's okay to launch several Sidekiq instances with the same configuration (processing the same queues). Is it possible that 2 or more Sidekiq instances will process the same message from a queue? UPDATE: I need to know if there is a possible conflict, when running Sidekiq on more than 1 machine 回答1: Yes, sidekiq can absolutely run many processes against the same queue. Redis will just give the message to a random process. 回答2:

Monit Ruby on Rails Sidekiq

安稳与你 提交于 2019-12-05 05:58:30
I'm trying to set up Monit for Sidekiq. Here's what I have so far for my config file: check process sidekiq_site with pidfile /var/www/site/tmp/pids/sidekiq.pid start program = "bundle exec sidekiq -C /var/www/site/config/sidekiq.yml -P /var/www/site/tmp/pids/sidekiq.pid" with timeout 90 seconds if totalmem is greater than 200 MB for 2 cycles then restart # eating up memory? group site_sidekiq The problem is I'm getting a message when I run monit reload that the program "bundle" does not exist. Does anyone have a solution for this? check this: https://groups.google.com/forum/?fromgroups=#

Sidekiq VS. RabbitMQ

对着背影说爱祢 提交于 2019-12-05 04:52:09
We are in need of a queuing system in our Ruby On Rails 4 web application what are the differences and why would/wouldn't you pick Sidekiq over RabbitMQ ? It's quite different things with different usage. Sidekiq is full-featured solution for job queueing and processing, while RabbitMQ is just a message broker where you can build your own stuff upon it. 来源: https://stackoverflow.com/questions/34525941/sidekiq-vs-rabbitmq

How to find failed jobs list in sidekiq?

Deadly 提交于 2019-12-05 03:04:36
I am using sidekiq in rails4 . How can I find failed jobs list and reprocesses them to perform in sidekiq ? See Sidekiq::RetrySet in sidekiq/api https://github.com/mperham/sidekiq/wiki/API#retries Try sidekiq-failures , I believe that is what you want. https://github.com/mhfs/sidekiq-failures 来源: https://stackoverflow.com/questions/23608052/how-to-find-failed-jobs-list-in-sidekiq

Using CarrierWave with Amazon Elastic Transcoder in a Rails app

让人想犯罪 __ 提交于 2019-12-05 02:11:36
问题 I asked two additional questions before this on Stack Overflow, but got very little help and I thought I would ask an open question for posterity. I have spent time parsing the AWS-SDK API docs and found very little direct answers to my needs. I have also posted on the AWS forums and haven't been able to get a good response there. A simple, comprehensive, step-by-step solution seems impossible to find. What I have completed: Uploading with CarrierWave direct to s3. I followed Railscast #383

Sidekiq retry count in job

别来无恙 提交于 2019-12-05 01:15:18
Is there a way to get the retry count for the current job? I want the job to stop, not crash, after x retries. I would like to ask the retry count in the perform method so I could simply return if the retry count equals x. def perform(args) return if retry_count > 5 ... end Using Sidekiq 2.12. Edit I (not the OP) have the same question but for a different reason. If the job is being retried I want to do additional sanity checking to make sure the job is needed and to quit retrying if it is no longer expected to succeed because something external changed since it was queued. So, is there a way

configure redis auth on sidekiq

时光毁灭记忆、已成空白 提交于 2019-12-04 19:40:17
问题 I think I am missing something since I couldn't find in the docs how to write the username and password for the redis instance to use with sidekiq.. Is there a way to do this? Or is it through ENV vars? 回答1: Sidekiq passes unrecognized redis options directly to the Redis driver: config.redis = { password: 'bar' } And redis does not have the concept of users so there's only password. 来源: https://stackoverflow.com/questions/25970513/configure-redis-auth-on-sidekiq

execute only one of many duplicate jobs with sidekiq?

对着背影说爱祢 提交于 2019-12-04 19:33:19
问题 I have a background job that does a map/reduce job on MongoDB. When the user sends in more data to the document, it kicks of the background job that runs on the document. If the user sends in multiple requests, it will kick off multiple background jobs for the same document, but only one really needs to run. Is there a way I can prevent multiple duplicate instances? I was thinking of creating a queue for each document and making sure it is empty before I submit a new job. Or perhaps I can set

rails + docker + sidekiq + Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)

旧时模样 提交于 2019-12-04 19:32:55
问题 I am getting this error while running my rails app with docker and docker-compose Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED) Please find my Docker file # Copy the Gemfile as well as the Gemfile.lock and install # the RubyGems. This is a separate step so the dependencies # will be cached unless changes to one of those two files # are made. COPY Gemfile Gemfile.lock ./ RUN gem install bundler && bundle install --jobs 20 --retry 5 # Copy the main application. COPY . ./app

How to tell if sidekiq is connected to redis server?

大城市里の小女人 提交于 2019-12-04 16:28:15
问题 Using the console, how can I tell if sidekiq is connected to a redis server? I want to be able to do something like this: if (sidekiq is connected to redis) # psuedo code MrWorker.perform_async('do_work', user.id) else MrWorker.new.perform('do_work', user.id) end 回答1: You can use Redis info provided by Sidekiq: redis_info = Sidekiq.redis { |conn| conn.info } redis_info['connected_clients'] # => "16" Took it from Sidekiq's Sinatra status app. 回答2: It sounds like you want to know if there is a