summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-05-04 17:02:08 +0900
committerShinya Maeda <shinya@gitlab.com>2018-05-04 17:02:08 +0900
commit812dd06d512ab7774b375ce45aa9235aafc99911 (patch)
tree34cc187b9a70ad95967dff67f3efa397424b9aee /app/workers
parent47c8e06cefb7396c6f08b9908bd34dd21c8d08b0 (diff)
downloadgitlab-ce-812dd06d512ab7774b375ce45aa9235aafc99911.tar.gz
Introduce Redis helpers. Rename BuildTraceChunkFlushToDbWorker to Ci::BuildTraceChunkFlushWorker.
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/all_queues.yml2
-rw-r--r--app/workers/build_trace_chunk_flush_to_db_worker.rb12
-rw-r--r--app/workers/ci/build_trace_chunk_flush_worker.rb13
3 files changed, 14 insertions, 13 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml
index 0d30971dfd2..dc628bb7f50 100644
--- a/app/workers/all_queues.yml
+++ b/app/workers/all_queues.yml
@@ -66,7 +66,7 @@
- pipeline_processing:pipeline_update
- pipeline_processing:stage_update
- pipeline_processing:update_head_pipeline_for_merge_request
-- pipeline_processing:build_trace_chunk_flush_to_db
+- pipeline_processing:ci_build_trace_chunk_flush
- repository_check:repository_check_clear
- repository_check:repository_check_single_repository
diff --git a/app/workers/build_trace_chunk_flush_to_db_worker.rb b/app/workers/build_trace_chunk_flush_to_db_worker.rb
deleted file mode 100644
index 495118f7c14..00000000000
--- a/app/workers/build_trace_chunk_flush_to_db_worker.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class BuildTraceChunkFlushToDbWorker
- include ApplicationWorker
- include PipelineQueue
-
- queue_namespace :pipeline_processing
-
- def perform(build_trace_chunk_id)
- Ci::BuildTraceChunk.find_by(id: build_trace_chunk_id).try do |build_trace_chunk|
- build_trace_chunk.use_database!
- end
- end
-end
diff --git a/app/workers/ci/build_trace_chunk_flush_worker.rb b/app/workers/ci/build_trace_chunk_flush_worker.rb
new file mode 100644
index 00000000000..b8f8be29c7b
--- /dev/null
+++ b/app/workers/ci/build_trace_chunk_flush_worker.rb
@@ -0,0 +1,13 @@
+module Ci
+ class BuildTraceChunkFlushWorker
+ include ApplicationWorker
+
+ queue_namespace :pipeline_processing
+
+ def perform(build_trace_chunk_id)
+ ::Ci::BuildTraceChunk.find_by(id: build_trace_chunk_id).try do |build_trace_chunk|
+ build_trace_chunk.use_database!
+ end
+ end
+ end
+end