README.md in sidekiq-belt-0.3.2 vs README.md in sidekiq-belt-0.3.4

- old
+ new

@@ -78,9 +78,73 @@ ```ruby Sidekiq::Belt.use!([:failed_batch_remove]) ``` ![failed_batch_remove](https://github.com/dannnylo/sidekiq-belt/assets/20794/e285a8b2-4626-48e1-b04a-5190ae51d43b) +### Create a list of jobs to run (sidekiq) +This feature is a manual job manager where you can list jobs. These jobs are grouped and organized in a `Run Jobs` tab. +You can easily and quickly select which job you want to run manually. + +To enable this feature, pass the `run_job` option: +```ruby +Sidekiq::Belt.use!([:run_job]) +``` + +![List jobs to run](https://github.com/dannnylo/sidekiq-belt/assets/20794/ed32dac7-46e2-4c44-b3de-69983c3b990c) + +To configure the list of jobs + +```ruby +Sidekiq::Belt.configure do |config| + config.run_jobs = [ + { class: "ManualClearDataWorker", args: ['a'] }, + { class: "ManualDoSomethingWorker", args: ['b'] }, + { class: "FirstOperationalWorker", args: ['c'], group: 'Operational' }, + { class: "SecondOperationalWorker", args: ['d'], group: 'Operational' }, + { class: "AnotherGroupWorker", args: ['e'], group: 'Group with a long name' } + ] +end +``` +Or + +```ruby +Sidekiq::Belt.configure do |config| + config.run_jobs.push({ class: "AWorker", args: ["a"] }) + config.run_jobs.push({ class: "BWorker" }) + + config.run_jobs << { class: "CWorker", args: ["a"], group: "Etc" } + config.run_jobs << { class: "DWorker", args: ["a"], group: "Etc" } +end +``` + +### Add to your web sidekiq a top label by enviroment (sidekiq) + +This feature adds a little line on top of Sidekiq web that shows a configurable message. + +![Top Page Development](https://github.com/dannnylo/sidekiq-belt/assets/20794/b1e2f6c2-a257-4172-92ec-09c61511334b) +![Top Page Production](https://github.com/dannnylo/sidekiq-belt/assets/20794/8e64d0e8-dcb2-42ee-b184-67d2f0b2cf6f) + +To enable this feature, pass the `top_label` option: +```ruby +Sidekiq::Belt.use!([:top_label]) +``` + +```ruby +Sidekiq::Belt.configure do |config| + config.top_label = { + production: { + background_color: 'red', + text: 'Be carefull', + color: 'white' + }, + development: { + background_color: 'green', + text: 'You are safe!', + color: 'white' + } + } +end +``` ## 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.