Skip to content

tangopium/sidekiq-delay-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sidekiq Delay Issue

This repository is a minimal setup of Ruby on Rails with Sidekiq. It is ment to allow reproducing an error in sidekiq-unique-jobs caused by the delayed job update of sidekiq jobs.

In order to reproduce, clone the repository and launch the app with the following command:

docker compose up app

Then schedule the TestJob by running

docker compose exec app rails runner "TestJob.perform_async"

Last step is to start the worker:

docker compose up app_worker

You will see an output similar to the following:

app_worker-1  | 2024-01-03T10:25:29.106Z pid=1 tid=c7h class=TestJob jid=bd8dc0009d206131f6218452 INFO: start
app_worker-1  | 2024-01-03T10:25:29.107Z pid=1 tid=c2h uniquejobs=reaper INFO: Nothing to delete; exiting.
app_worker-1  | 2024-01-03T10:25:29.109Z pid=1 tid=c6d DEBUG: Firing heartbeat event
app_worker-1  | 2024-01-03T10:25:29.109Z pid=1 tid=c2h uniquejobs=reaper INFO: Deleting batch with 1 digests
app_worker-1  | 2024-01-03T10:25:29.110Z pid=1 tid=c2h INFO: (2024-01-03 10:25:29 +0000) Execution successfully returned 1
app_worker-1  | 2024-01-03T10:25:29.217Z pid=1 tid=c7h class=TestJob jid=bd8dc0009d206131f6218452 INFO: Initialize test worker
app_worker-1  | 2024-01-03T10:25:29.217Z pid=1 tid=c7h class=TestJob jid=bd8dc0009d206131f6218452 elapsed=0.111 INFO: done
app_worker-1  | 2024-01-03T10:25:39.111Z pid=1 tid=c6d DEBUG: Flushed 2 metrics

Hence, the worker gets initialized and is supposed to run, but doesn't actually enter the perform method.

Used Libraries/Frameworks

  • Docker / Docker Compose
  • Ruby 3.2.2
  • Ruby on Rails 7.1.2
  • Sidekiq 7.2.0
  • Sidekiq Unique Jobs 8.0.5

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published