Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-17 15:50:03 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-17 15:50:03 +0300
commit67ca5a53f6df0c3d0f2598c777491c0548d76e50 (patch)
treeadbd12e3b93c6f79335625dd2769843e15676341 /app/workers
parent881fbe5070331f934fff3441dbc0e65377b030bf (diff)
Build missing cache items in background job after each push
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/project_cache_worker.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/workers/project_cache_worker.rb b/app/workers/project_cache_worker.rb
new file mode 100644
index 00000000000..4c14565dce5
--- /dev/null
+++ b/app/workers/project_cache_worker.rb
@@ -0,0 +1,9 @@
+class ProjectCacheWorker
+ include Sidekiq::Worker
+
+ sidekiq_options queue: :default
+
+ def perform(project_id)
+ Project.find(project_id).repository.build_cache
+ end
+end