Commit 0bcfa77f authored by Robert Speicher's avatar Robert Speicher

Merge branch 'move-worker-prepends' into 'master'

Move EE prepend/include to the end of workers

See merge request gitlab-org/gitlab-ee!8206
parents 156dfa40 e03fc3eb
# frozen_string_literal: true # frozen_string_literal: true
class BuildFinishedWorker class BuildFinishedWorker
prepend EE::BuildFinishedWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
...@@ -23,3 +22,5 @@ class BuildFinishedWorker ...@@ -23,3 +22,5 @@ class BuildFinishedWorker
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
end end
BuildFinishedWorker.prepend(EE::BuildFinishedWorker)
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
class PostReceive class PostReceive
include ApplicationWorker include ApplicationWorker
prepend EE::PostReceive
def perform(gl_repository, identifier, changes) def perform(gl_repository, identifier, changes)
project, is_wiki = Gitlab::GlRepository.parse(gl_repository) project, is_wiki = Gitlab::GlRepository.parse(gl_repository)
...@@ -64,3 +62,5 @@ class PostReceive ...@@ -64,3 +62,5 @@ class PostReceive
Gitlab::GitLogger.error("POST-RECEIVE: #{message}") Gitlab::GitLogger.error("POST-RECEIVE: #{message}")
end end
end end
PostReceive.prepend(EE::PostReceive)
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# Worker for updating any project specific caches. # Worker for updating any project specific caches.
class ProjectCacheWorker class ProjectCacheWorker
include ApplicationWorker include ApplicationWorker
prepend EE::Workers::ProjectCacheWorker
LEASE_TIMEOUT = 15.minutes.to_i LEASE_TIMEOUT = 15.minutes.to_i
# project_id - The ID of the project for which to flush the cache. # project_id - The ID of the project for which to flush the cache.
...@@ -43,3 +41,5 @@ class ProjectCacheWorker ...@@ -43,3 +41,5 @@ class ProjectCacheWorker
.try_obtain .try_obtain
end end
end end
ProjectCacheWorker.prepend(EE::Workers::ProjectCacheWorker)
...@@ -5,8 +5,6 @@ class RepositoryImportWorker ...@@ -5,8 +5,6 @@ class RepositoryImportWorker
include ExceptionBacktrace include ExceptionBacktrace
include ProjectStartImport include ProjectStartImport
include ProjectImportOptions include ProjectImportOptions
prepend EE::RepositoryImportWorker
def perform(project_id) def perform(project_id)
@project = Project.find(project_id) @project = Project.find(project_id)
...@@ -49,3 +47,5 @@ class RepositoryImportWorker ...@@ -49,3 +47,5 @@ class RepositoryImportWorker
project.gitlab_project_import? project.gitlab_project_import?
end end
end end
RepositoryImportWorker.prepend(EE::RepositoryImportWorker)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment