sidekiq-unique-jobs
Delayed::Job
sidekiq-unique-jobs | Delayed::Job | |
---|---|---|
4 | 10 | |
1,419 | 4,802 | |
- | 0.1% | |
7.9 | 1.6 | |
about 1 month ago | 6 days ago | |
Ruby | Ruby | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sidekiq-unique-jobs
-
How to Avoid Race Conditions in Rails
If you use Sidekiq workers to make changes to your database, you can use SidekiqUniqueJobs to add unique constraints to Sidekiq queues. Uniqueness is achieved by acquiring locks for a hash of a queue name, a worker class, and a job's arguments. By default, only one lock for a given hash can be acquired. If an attempt to acquire a new lock is made, an exception SidekiqUniqueJobs::ScriptError is raised.
- Sidekiq - enqueue a job after a series of other jobs are finished
-
Delayed Job vs. Sidekiq: Which Is Better?
https://github.com/mhenrixon/sidekiq-unique-jobs
All of which also extend the web UI for Sidekiq which is incredibly useful for both debugging and having a handle on what's with your queues.
Finally, if you're going to be using Sidekiq in any serious way I'd recommend Nate Berkopec's "Sidekiq in Practice" - https://nateberk.gumroad.com/l/sidekiqinpractice
Beyond being an incredibly useful resource on its own - you get access to a very active private Slack that is filled with other very helpful developers who are using Sidekiq.
-
Getting Sidekiq to play nicely with auto-scaling
That's an interesting suggestion. We're relying on ActiveJob and sidekiq-unique-jobs doesn't explicitly support it, unfortunately. We'll have to test it out, though, and see if it just happens to work.
Delayed::Job
-
How to narrow down race condition in delayed job/mysql2?
I included this in the github issue but we had coverband induced log spam, it got fixed and suddenly we hit the bug. I did find this from someone with a similar issue but there was no conclusion.
-
How to run a really long task from a Rails web request
So how do we trigger such a long-running process from a Rails request? The first option that comes to mind is a background job run by some of the queuing back-ends such as Sidekiq, Resque or DelayedJob, possibly governed by ActiveJob. While this would surely work, the problem with all these solutions is that they usually have a limited number of workers available on the server and we didn’t want to potentially block other important background tasks for so long.
-
Delayed Job vs. Sidekiq: Which Is Better?
Several gems support job queues and background processing in the Rails world — Delayed Job and Sidekiq being the two most popular ones.
Rails 7 support only just got added https://github.com/collectiveidea/delayed_job/pull/1161
-
Why does rails have a tradition of queuing background jobs in a separate NoSQL store, when both the queueing controller and the job class tend to hammer the main database anyway?
Back in the day, before Sidekiq and such, we used Delayed Job https://github.com/collectiveidea/delayed_job
-
A quick look at background jobs in Ruby
There are a few of popular systems. A few need a database, such as Delayed::Job, while others prefer Redis, such as Resque and Sidekiq.
-
Schedule background jobs in Rails with Integromat
I always wad a fan of Sidekiq, but recently I wanted to remove redis as a dependency. I ended up going back to classic delayed_job. My reason for that was I also didn't want dependency with Postgres, as I like to use sqlite on development and Postgres on production. The best solution I've seen is Que, which works with Postgres. It is complete, has all the features you need.
-
Background Job Processing in Ruby without external libraries and dependencies
Ruby gets hammered a lot for its green threads and no real concurrency yet Ruby libraries such as Resque, Delayed Job and Sidekiq are some of the most popular choices to run background jobs in the industry. When you have a huge project and millions of requests and hundreds of thousands of operations to perform, reach out to one of these solutions which are feature complete and you don’t have to reinvent the wheel as its complex piece of software to implement and requires thousands of human hours. While they help you scale sometimes they are not what you are looking for or need as they are meant for a scale of 10000s of jobs per second and what you need is a background processing for few jobs that can be handled in memory without a dependency of a queue such as Redis. If you look at the benchmark numbers from Sidekiq they are for 100K jobs because that is the scale it is meant to be though one can use it for running a few hundred complex jobs as well where you require queue management and supervision.
-
Digital Ocean App Platform vs Heroku
Before we dive in, I wanted to go over my background real quick for context. I'm mostly a Rails developer professionally, and I am on the 'Infrastructure' team at work, so I integrate closely with Heroku and am pretty familiar with their product and offerings. Given my Rails background, this article will focus on deploying a web app with at least one background job process. For my hackathon app, I had a web process running Puma and a worker process running DelayedJob.
What are some alternatives?
sidekiq-throttled - Concurrency and rate-limit throttling for Sidekiq
Sidekiq - Simple, efficient background processing for Ruby
job-iteration - Makes your background jobs interruptible and resumable by design.
Sucker Punch - Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
Sidekiq-Cron - Scheduler / Cron for Sidekiq jobs
good_job - Multithreaded, Postgres-based, Active Job backend for Ruby on Rails.
with_advisory_lock - Advisory locking for ActiveRecord
Que - A Ruby job queue that uses PostgreSQL's advisory locks for speed and reliability.
Shoryuken - A super efficient Amazon SQS thread based message processor for Ruby
sidekiq - Sidekiq worker on Render
Sneakers - A fast background processing framework for Ruby and RabbitMQ