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

Sidekiq logs in Rails 7 when using bin/dev

The title says it all. I have a vanilla Rails 7 application that is using Sidekiq 7 in the most typical setup. I start my local processes with bin/dev. This fails to show Sidekiq outputs. My Procfile.dev looks as follows: web: bin/rails server -p…
earnold
  • 1,440
  • 1
  • 15
  • 26
0
votes
1 answer

Rails Activestorage and sidekiq: Why is .attach not working with async job?

I use this method in a sidekiq job: def attach_poster(poster_url,obj) resp = HTTParty.get(poster_url) file = Tempfile.new begin file.binmode file.write(resp.body) file.rewind obj.poster.attach(io: file,…
remco
  • 76
  • 4
0
votes
2 answers

Testing Mails queued with Sidekiq

Because we need to have the ability to schedule email delivery, we have migrated to using Sidekiq to send emails with the deliver_later method. Under the old regime that used deliver_now, our testing could…
Edward Caulfield
  • 448
  • 5
  • 12
0
votes
0 answers

How to read IO stream without reaching EOF?

In one of the legacy application I am working, we are trying to get extracted zip file name through Open3 utility. This is divided into two commands. First command unzip the compressed file and the second one tries to list and grep filename with…
Aparichith
  • 1,452
  • 4
  • 20
  • 40
0
votes
2 answers

Sidekiq not running enqueued jobs (Rails 7 + Redis + Sidekiq + Docker)

As the title says, i have 3 containers running in docker, 1 for rails, 1 for a postgres db and 1 for redis. I'm able to enqueue jobs doing Job.perform_async but for some reason my jobs stay on the enqueued indefinitely. I checked and my Redis…
Maxi
  • 79
  • 1
  • 6
0
votes
0 answers

rails sidekiq worker timeout error are coming without completing the execution of worker

I am using gem 'sidekiq', '~> 6.0.0' in my rails application. One of my worker are returning timeout error with uncompleted its execution at the staging server but it runs fine on localhost. I know whatever works my worker did that works required…
0
votes
1 answer

Ruby on rails sidekiq: Pass lambda method

I have been trying to see if this is possible and so far have found nothing so I will try and ask specifically Is it possible to have a sidekiq worker which can recive a method as for example a lambda method and pass on arguments to it? Example…
0
votes
1 answer

delete request with sidekiq

I am new to Ruby on Rails and Sidekiq. I want to set this delete request to be done in Sidekiq queue and I don't know how to send it to the perform method, I am sending the Book model to the perform method My controller Action code def destroy …
0
votes
2 answers

Best approach for a scheduled update use case - ruby on rails

I have an specific requirement to be implemented, and any thoughts on thet would be welcome The requirement A given Appointment model has the following structure: Appointment { status, # 'scheduled' or 'done' happens_at # Datetime } The status…
cchiaramelli
  • 171
  • 2
  • 6
0
votes
0 answers

Worker directory for Shoryuken and Sidekiq

I have a rails app where we want to use both sidekiq (redis queue) and shoryuken (sqs queue) for different use cases. So now , all the sidekiq workers are defined under app/workers. To separate out shoryuken workers, we thought to define and keep…
Vipul Kumar
  • 259
  • 1
  • 2
  • 12
0
votes
2 answers

Avoid duplicate sidekiq job

I have a worker that runs when the user selects a time. If the user selects a time twice, the worker runs twice. How do I avoid it from being executed multiple times? I mean, If the user selects to be executed after 10 minutes, then deletes this…
b d
  • 3
  • 3
0
votes
0 answers

How can Shoryuken Process read aws credentials from IAM profile

We have a shoryuken worker process setup in rails application (ruby 2.6.6, rails > 5). this is the shoryuken.yml.erb file :aws: :access_key_id: ? :secret_access_key: ? :region: <%= Settings.aws.region %> :concurrency: 10 :daemon:…
Vipul Kumar
  • 259
  • 1
  • 2
  • 12
0
votes
2 answers

Schedule Cron job for different timezones rails?

I want to schedule a cron job that would send emails to all users as soon as deadline for their events ended. Note: Every user have different timezone. The approach i was thinking about: I have a cron job that will run every day at 11 PM of UTC.…
0
votes
0 answers

issue with Rails ActiveStorage, Heroku and background threads

We have a Rails application that runs several jobs in the background using Sidekiq. Those jobs will create a processing log and attempt to attach it to a database object using ActiveStorage. The following code illustrates the issue: class Import <…
Mike
  • 1,031
  • 14
  • 36
0
votes
1 answer

Where do I place testing logic for Sidekiq workers?

I'm writing an app that responds to a webhook event that then kicks off a few background jobs using Sidekiq. I'm using Minitest for my testing library. Right now I have one large integration test (/test/integration/test-name.rb). I know integration…
eighdah14
  • 155
  • 6
1 2 3
99
100