diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-15 00:09:23 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-15 00:09:23 +0000 |
commit | 8aab944cc5e9b58ecc6f052db7cb8985a8a0ba51 (patch) | |
tree | 67f4c47cd3b3712daa0035bef27f04b04582e1b4 /app/workers | |
parent | f9cda7671cfb07795d9ea01a7117f7d6c6511d0d (diff) | |
download | gitlab-ce-8aab944cc5e9b58ecc6f052db7cb8985a8a0ba51.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/all_queues.yml | 8 | ||||
-rw-r--r-- | app/workers/partition_creation_worker.rb | 15 |
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 |