summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-15 00:09:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-15 00:09:23 +0000
commit8aab944cc5e9b58ecc6f052db7cb8985a8a0ba51 (patch)
tree67f4c47cd3b3712daa0035bef27f04b04582e1b4 /app/workers
parentf9cda7671cfb07795d9ea01a7117f7d6c6511d0d (diff)
downloadgitlab-ce-8aab944cc5e9b58ecc6f052db7cb8985a8a0ba51.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/all_queues.yml8
-rw-r--r--app/workers/partition_creation_worker.rb15
2 files changed, 23 insertions, 0 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml
index 4b308f0cb3b..6ea84fdf8f4 100644
--- a/app/workers/all_queues.yml
+++ b/app/workers/all_queues.yml
@@ -235,6 +235,14 @@
:weight: 1
:idempotent:
:tags: []
+- :name: cronjob:partition_creation
+ :feature_category: :database
+ :has_external_dependencies:
+ :urgency: :low
+ :resource_boundary: :unknown
+ :weight: 1
+ :idempotent: true
+ :tags: []
- :name: cronjob:personal_access_tokens_expiring
:feature_category: :authentication_and_authorization
:has_external_dependencies:
diff --git a/app/workers/partition_creation_worker.rb b/app/workers/partition_creation_worker.rb
new file mode 100644
index 00000000000..9101623d93a
--- /dev/null
+++ b/app/workers/partition_creation_worker.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class PartitionCreationWorker
+ include ApplicationWorker
+ include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
+
+ feature_category :database
+ idempotent!
+
+ def perform
+ Gitlab::AppLogger.info("Checking state of dynamic postgres partitions")
+
+ Gitlab::Database::Partitioning::PartitionCreator.new.create_partitions
+ end
+end