Skip to content

Commit 89401e8

Browse files
#800 fix async job problem with arguments
1 parent 8ae7a10 commit 89401e8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: app/workers/githosting_shell_worker.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ class GithostingShellWorker
55

66
sidekiq_options queue: :redmine_git_hosting, retry: false
77

8-
def self.maybe_do(command, object, **options)
8+
def self.maybe_do(command, object, options)
99
args = [command.to_s, object, options]
1010
Sidekiq::Queue.new(:redmine_git_hosting).each do |job|
11-
return if job.args == args
11+
return nil if job.args == args
1212
end
1313

1414
perform_async command, object, options
1515
end
1616

17-
def perform(command, object, **options)
17+
def perform(command, object, options)
1818
logger.info "#{command} | #{object} | #{options}"
1919
RedmineGitHosting::GitoliteWrapper.resync_gitolite command, object, options
2020
end

Diff for: lib/redmine_git_hosting/gitolite_accessor.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ def resync_gitolite(command, object, **options)
116116

117117
if RedmineGitHosting::Config.gitolite_use_sidekiq? &&
118118
RedmineGitHosting::Config.sidekiq_available? && !bypass
119-
GithostingShellWorker.maybe_do command, object, **options
119+
GithostingShellWorker.maybe_do command, object, options
120120
else
121-
GitoliteWrapper.resync_gitolite command, object, **options
121+
GitoliteWrapper.resync_gitolite command, object, options
122122
end
123123
end
124124
end

0 commit comments

Comments
 (0)