Questions tagged [sidekiq]

Sidekiq is a background processing framework for Ruby.

Sidekiq is a multi-threaded background job and message processing gem written by Mike Perham and is available on GitHub.

2372 questions
0
votes
0 answers

How does Redis assist queueing at all when running Sidekiq? What exactly does Redis queueing optimize if I'm already using Sidekiq

I am building a simple feature, where multiple hundreds of users will be clicking a button for adding a product as a favorite item. I am currently thinking of using Redis + Sidekiq, but had a question about whether Redis is actually essential at…
Alexander Solonik
  • 9,838
  • 18
  • 76
  • 174
0
votes
1 answer

How to enable a worker dyno for a Heroku review app

I have a Rails v6.x app running on Heroku. We use review apps to preview features etc before they go live. Our app uses Sidekiq to manage background jobs that run on a worker dyno in production. When we open a pull request and the review app gets…
emersonthis
  • 32,822
  • 59
  • 210
  • 375
0
votes
0 answers

ActiveRecordNotFound on wisper publish

We have a model ChatRoom which has many messages, the ChatRoom implements add_message and receives the parameters for the message along with a boolean notify which specifies whether we should send an email or not for the created message. We publish…
0
votes
1 answer

Is there any way to edit the retry count for Sidekiq job?

I am in middle of running a sidekiq job and let's say for some reason an error occurs. For that particular error we don't want to update the retry_count of the sidekiq job but want to trigger the retry. Is there any particular way to do it?. I tried…
Amit Singh
  • 135
  • 1
  • 1
  • 8
0
votes
1 answer

How can I perform a worker when a date of my table is equal to current date - Ruby on Rails

How can I perform a worker when a date of my table is equal to current date on Ruby on Rails 7.0, I'm using Sidekiq and Sidekiq Schedule and I have this table class CreateDraws < ActiveRecord::Migration[7.0] def change create_table :draws do…
Javier
  • 25
  • 7
0
votes
0 answers

activejob error - Unable to autoload constant for gem that exists

On my project we are using Docker, Rails, Sidekiq and the hyrax and bulkrax gems. But after submitting a job we are seeing errors like this in the logs. [ActiveJob] [Bulkrax::ImportWorkJob] [c51d6569-3b0e-46f0-be44-e84a0224448e] Error performing…
Tracy McCormick
  • 401
  • 1
  • 7
  • 18
0
votes
2 answers

How to safely rename a file containing a Sidekiq worker? [Ruby on Rails]

I need to rename a file containing a Sidekiq worker. worker_a.rb -> workers/worker_a.rb The class defined in worker_a.rb: class WorkerA include Sidekiq::Worker end I believe this is unsafe because if there's a background job enqueued to run this…
Luan Truong
  • 134
  • 5
0
votes
1 answer

Rails/Sidekiq prevent launching new job if same job is currently enqueued or running

My rails application runs with sidekiq. The app has_many accounts. Each account can run a ImportResourceJob which sends the account_id as argument to identify the correct account to work on. I want to prevent launching concurrently many…
David Geismar
  • 3,152
  • 6
  • 41
  • 80
0
votes
1 answer

get sidekiq last job instance variable in retries_exhausted block

class EventMonitor include Sidekiq::Worker sidekiq_options retry: 4 sidekiq_retry_in { 10 } sidekiq_retries_exhausted do |msg| # do something with @response end def perform(country_code) @response = # call an…
nanakondor
  • 615
  • 11
  • 25
0
votes
0 answers

I am getting NameError (undefined local variable or method `analytics' for AnalyticsDemo:Class): in my production environment

I am using 'analytics-ruby', '~> 2.0.0' in my worker as: class AnalyticDemo include Sidekiq::Worker sidekiq_options unique: true def analytics @analytics ||= Segment::Analytics.new( write_key: Figaro.env.segment_write_key …
0
votes
1 answer

Refactoring an API request on Rails

I have a rails worker using redis/sidekiq where I send some data to an API (Active Campaign), so I normally use all the http configurations to send data. I want to have it nice and clean, so it's part of a refactor thing. My worker currently looks…
theKid
  • 522
  • 6
  • 19
0
votes
1 answer

Old version of job keeps ressurecting after deletion on SideKiq

I have one job that keeps running here is the result from Sidekiq::Cron::Job.all.to_yaml my problem is this code hasn't been used in months and i can't delete it for the life of me I use the SideKiq web ui gem to delete all dead and retry versions…
NooBskie
  • 3,761
  • 31
  • 51
0
votes
0 answers

Upload attachment asynchronously with Shrine

I want to upload big files (over 5GB). My API works as expected, but it's synchronous. Is there a way to upload attachments asynchronously with sidekiq? I created a worker, but since I cannot pass an object to perform_async method (I tried to pass…
0
votes
1 answer

Debugging why a Sidekiq Job is stuck

I've been struggling to wrap my head around how I can debug why my Sidekiq processor is stuck. I've read the following resources: Dealing with Stuck Workers. Debugging stuck Ruby processes Problems and Troubleshooting · mperham/sidekiq Wiki I…
Overload119
  • 5,124
  • 5
  • 29
  • 34
0
votes
1 answer

How to add a scheduled Resque job in ruby on rails?

Recently I have shifted from 'Sidekiq' to 'Resque' gem in my application. I want to shift the scheduled jobs also. But I am unaware of how to do that. Code with Sidekiq (Before) - class SetCurrentDay include Sidekiq::Worker include…
1 2 3
99
100