diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-11-17 19:24:40 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-11-28 21:42:08 +0300 |
commit | a4a389a0a7314d011275592474bd974924f86735 (patch) | |
tree | 3469be680f8e0cf5931cb54fa784a86389e43d0f /app/workers | |
parent | a7f6ab952acc58e7ef9a33fba3fbaaa0918572fe (diff) |
BE for automatic pipeline when enabling Auto DevOps
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/38962
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/create_pipeline_worker.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/workers/create_pipeline_worker.rb b/app/workers/create_pipeline_worker.rb new file mode 100644 index 00000000000..865ad1ba420 --- /dev/null +++ b/app/workers/create_pipeline_worker.rb @@ -0,0 +1,16 @@ +class CreatePipelineWorker + include Sidekiq::Worker + include PipelineQueue + + enqueue_in group: :creation + + def perform(project_id, user_id, ref, source, params = {}) + project = Project.find(project_id) + user = User.find(user_id) + params = params.deep_symbolize_keys + + Ci::CreatePipelineService + .new(project, user, ref: ref) + .execute(source, **params) + end +end |