Skip to content

Commit

Permalink
fix workers
Browse files Browse the repository at this point in the history
  • Loading branch information
zzet committed Aug 28, 2014
1 parent 1b9d996 commit d33850f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/workers/block_user_worker.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class BlockUserWorker
@queue = :common

def self.perform(user_idi, author_id)
def self.perform(user_id, author_id)
author = User.find(author_id)
user = User.find(user_id)

Expand Down
2 changes: 0 additions & 2 deletions app/workers/ci_build_result_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class CiBuildResultWorker
include Gitlab::Identifier

@queue = :build_result

def self.perform(data)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/elastic/base_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Elastic::BaseIndexer
logger: Logger)

def self.perform(operation, klass, record_id, options={})
logger.debug [operation, "#{klass}##{record_id} #{options.inspect}"]
Logger.debug [operation, "#{klass}##{record_id} #{options.inspect}"]

cklass = klass.constantize

Expand Down
3 changes: 3 additions & 0 deletions app/workers/post_receive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ class PostReceive
@queue = :post_receive

def self.perform(repo_path, oldrev, newrev, ref, identifier)
PostReceive.new.perform(repo_path, oldrev, newrev, ref, identifier)
end

def perform(repo_path, oldrev, newrev, ref, identifier)
if repo_path.start_with?(Gitlab.config.gitlab_shell.repos_path.to_s)
repo_path.gsub!(Gitlab.config.gitlab_shell.repos_path.to_s, "")
else
Expand Down
4 changes: 0 additions & 4 deletions lib/gitlab/backend/shell_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#
module Gitlab
module ShellAdapter
def self.gitlab_shell
Gitlab::Shell.new
end

def gitlab_shell
Gitlab::Shell.new
end
Expand Down

0 comments on commit d33850f

Please sign in to comment.