sidekiq

sidekiq not starting with bundle exec

六眼飞鱼酱① 提交于 2019-12-11 13:02:30
问题 I am trying to start up sidekiq and am using: bundle exec sidekiq from the directory my script and gemfile are located. This is what I am getting: 2015-11-17T19:20:48.801Z 78733 TID-owl77getk INFO: ================================================================== 2015-11-17T19:20:48.801Z 78733 TID-owl77getk INFO: Please point sidekiq to a Rails 3/4 application or a Ruby file 2015-11-17T19:20:48.801Z 78733 TID-owl77getk INFO: to load your worker classes with -r [DIR|FILE]. 2015-11-17T19:20:48

No such file or directory error with Sidekiq on Heroku

夙愿已清 提交于 2019-12-11 12:14:59
问题 I'm using the Sidekiq gem to do some background processing involving video files. On my local machine everything works fine but I'm getting the aforementioned error in production. I read about Heroku's ephemeral filesystem and sure enough I'd restarted Heroku so that could be the problem? If it is I don't know how to deal with it given that there is already a tmp folder in my app's root directory. This is the exact error I'm getting from my worker: 2015-09-09T21:41:37.859890+00:00 app[worker

Sidekiq on heroku - Error R14 (Memory quota exceeded)

时光怂恿深爱的人放手 提交于 2019-12-11 10:55:24
问题 I have a sidekiq process which runs on heroku that blows up after it has been running for a while with this error message: Error R14 (Memory quota exceeded) Can anyone give me any pointers about how to start the diagnosis as to what is happening? There is nothing obvious that could be causing this. 回答1: We are facing the same problem and have decided to let Newrelic do the heavy lifting and help us with the diagnostic. There are some free Newrelic plans you might be able to use for that, but

Sidekiq - Reschedule failed job

帅比萌擦擦* 提交于 2019-12-11 10:14:14
问题 I have a background job using Sidekiq connecting to another service of mine like this: def perform(id) user = ABCClient.instance.user(id) ... end Sometimes this ABCClient is down and I would like to reschedule the "perform" job in this case. Like this: def perform(id) begin user = ABCClient.instance.user(id) rescue => e # Reschedule job end ... end 回答1: https://github.com/mperham/sidekiq/wiki/Scheduled-Jobs rescue => e self.class.perform_in(5.minutes, id) end 来源: https://stackoverflow.com

How can I prevent Sidekiq processing new jobs based on code version?

梦想的初衷 提交于 2019-12-11 06:56:26
问题 We are deploying versions of a sidekiq worker to Cloud Foundry as part of a continuous delivery pipeline. We need to stop workers processing new jobs if they are no longer the latest version. So: Worker v1 is running and performing a 30 min job. We deploy v2 of the worker code. v1 should continue with current jobs but not start any new ones. CloudFoundry won't allow us to send USR1, so we need a solution that allows the workers to determine if they are the latest version before every job

Importing csv into multiple mysql databases from rails app

允我心安 提交于 2019-12-11 06:46:13
问题 I have a CSV file consisting of 78,000 records.Im using smarter_csv (https://github.com/tilo/smarter_csv) to parse the csv file. I want to import that into a MySQL database from my rails app. I have the following two questions What would be the best approach to quickly importing such a large data-set into MySQL from my rails app ?. Would using resque or sidekiq to create multiple workers be a good idea ? I need to insert this data into a given table which is present in multiple databases. In

Querying sidekiq for models queued

混江龙づ霸主 提交于 2019-12-11 04:52:10
问题 I have a gallery with photos, on which processing photos is through sidekiq. When a gallery has photos that are processing or in queue, I'd like to write something in the page. one option for this is to mark each photo with processing when it is added to the queue, and let sidekiq worker remove that when finished. The downside is that I need to check if at least one photo is processing, meaning check all photos... Is there a way to query sidekiq directly? 回答1: You can use the sidekiq-status

Rails 3 Sidekiq Passenger

纵饮孤独 提交于 2019-12-11 01:37:51
问题 I am able to get Sidekiq scheduler working locally. The last obstacle in my way is how to deploy this to a production app on passenger. Can someone point me in the right direction on how to run Sidekiq continuously on passenger. Appreciate it. 回答1: Passenger is a Apache\nginx module for running Rails\Rack apps. Sidekiq is a threaded background worker queue that usually is run with JRuby in production. You do not run Sidekiq through Passenger. Rather, just configure Passenger to run and serve

sidekiq - Is concurrency > 50 stable?

此生再无相见时 提交于 2019-12-10 22:45:48
问题 Sidekiq documentation says: Don't set the concurrency higher than 50. I've seen stability issues with concurrency of 100, for example Well, my low memory consumption enables me to use concurrency of 350 threads on a single 512MB X1 heroku dyno. And I would like to use ~300 because all jobs are IO intensive (http requests). I wonder what issues can I encounter in? I tried to monitor the logs at overload with 80 and seen no issues. What issues should I expect when setting up concurrency of 300

How can I create sidekiq queues with variable names at runtime?

女生的网名这么多〃 提交于 2019-12-10 20:15:59
问题 I am trying to create queues with variable queue names. queue_name = "guide_" + guide['id'].to_s Sidekiq::Client.push({ 'class' => GuidePdfWorker, 'queue' => queue_name, 'args' => [key], 'backtrace' => true }) I know that I am supposed to add them to config/sidekiq.yml, but I can't, since I don't know the value of queue_name. When I log Sidekiq::Client.registered_queues() I can see my queues, but they are never processed. 回答1: The Sidekiq Dynamic Queues gem will probably help you. 回答2: Just