Skip to content

dannnylo/sidekiq-belt

Repository files navigation

Sidekiq::Belt

Gem Version Build Status

This Ruby gem enhances the capabilities of Sidekiq, Sidekiq Pro, and Sidekiq Enterprise by adding essential utilities.

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add sidekiq-belt

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install sidekiq-belt

Features

To enable all features, add the following code to the end of the Sidekiq initializer file:

Sidekiq::Belt.use!

or

Sidekiq::Belt.use!([:all])

To enable only specific features, add the following code to the Sidekiq initializer file while passing the necessary options:

Sidekiq::Belt.use!([:periodic_run, :periodic_pause])

Run Periodic Jobs Manually (sidekiq-enterprise)

This functionality adds a button on the Sidekiq Enterprise web page that allows manual execution of a job. To enable this feature, pass the periodic_run option:

Sidekiq::Belt.use!([:periodic_run])

periodic_run_index periodic_run_show

Pause Periodic Jobs (sidekiq-enterprise)

This option adds a button to pause and unpause the cron of a periodic job. When a periodic job is paused, the perform is skiped and on server this content is logged.

2023-10-12T19:24:00.001Z pid=127183 tid=2ian INFO: Job SomeHourlyWorkerClass is paused by Periodic Pause

To enable this feature, pass the periodic_pause option:

Sidekiq::Belt.use!([:periodic_pause])

periodic_pause periodic_unpause

Delete an Unfinished Batch (sidekiq-pro)

This option adds a button to remove failed batches.

To enable this feature, pass the failed_batch_remove option:

Sidekiq::Belt.use!([:failed_batch_remove])

failed_batch_remove

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dannnylo/sidekiq-belt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Sidekiq::Belt project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

This Ruby gem enhances the capabilities of Sidekiq, Sidekiq Pro, and Sidekiq Enterprise by adding essential utilities.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published