{"repo":"veeqo/activejob-uniqueness","free":true,"listed":false,"github":"https://github.com/veeqo/activejob-uniqueness","clone":"git clone https://github.com/veeqo/activejob-uniqueness.git","description":"Unique jobs for ActiveJob. Ensure the uniqueness of jobs in the queue.","language":"Ruby","stars":302,"topics":["activejob","lock","redis","distributed-locks","rails","uniqueness"],"license":"MIT","category":"databases-storage","readme_excerpt":"Job uniqueness for ActiveJob The gem allows to protect job uniqueness with next strategies: Strategy The job is locked The job is unlocked - - - until executing when pushed to the queue when processing starts until executed when pushed to the queue when the job is processed successfully until expired when pushed to the queue when the lock is expired until and while executing when pushed to the queue when processing starts a runtime lock is acquired to prevent simultaneous jobs has extra options: runtime lock ttl , on runtime conflict while executing when processing starts when the job is processed with any result including an error Inspired by SidekiqUniqueJobs, uses Redlock under the hood. Installation Add the activejob-uniqueness gem to your Gemfile. If you want jobs unlocking for Sidekiq Web UI, require the patch explicitly. Queues cleanup becomes slower! And run bundle install command. Configuration ActiveJob::Uniqueness is ready to work without any configuration. It will use REDIS URL to connect to Redis instance. To override the defaults, create an initializer config/initializers/active job uniqueness.rb using the following command: This gem relies on redlock for it's Redis connection, that means it will not inherit global configuration of Sidekiq . To configure the connection, you can use config.redlock servers , for example to disable SSL verification for Redis/Key-Value cloud providers: Usage Make the job to be unique Tune uniqueness settings per job You can set defa","default_branch":null,"files":null,"tree":[],"storefront":"/r/veeqo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/veeqo/activejob-uniqueness/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}