Skip to content

Commit

Permalink
Fix rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dannnylo committed Feb 25, 2025
1 parent 79f2028 commit edd4a3e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/sidekiq/belt/community/run_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

require "sidekiq/web"
require "sidekiq/web/helpers"
require 'byebug'

module Sidekiq
module Belt
Expand All @@ -23,6 +22,7 @@ def self.list_grouped_jobs

def self.dynamic_type?(arg, type)
return false unless arg.is_a?(Hash)

arg[:dynamic].to_s == type
end

Expand All @@ -34,12 +34,12 @@ def self.run_job(job_id, extra_args = {})

new_args = []
args.each_with_index do |arg, i|
if dynamic_type?(arg, 'text')
if dynamic_type?(arg, "text")
new_args[i] = extra_args.shift
elsif dynamic_type?(arg, 'integer')
elsif dynamic_type?(arg, "integer")
new_args[i] = extra_args.shift.to_i
elsif dynamic_type?(arg, 'boolean')
new_args[i] = extra_args.shift == 'true'
elsif dynamic_type?(arg, "boolean")
new_args[i] = extra_args.shift == "true"
else
new_args << arg
end
Expand All @@ -57,7 +57,7 @@ def self.registered(app)
end

app.post("/run_jobs/:rjid/run") do
args = url_params('args')
args = url_params("args")

Sidekiq::Belt::Community::RunJob.run_job(route_params(:rjid).to_i, args)

Expand Down

0 comments on commit edd4a3e

Please sign in to comment.