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 /config/initializers | |
parent | f9cda7671cfb07795d9ea01a7117f7d6c6511d0d (diff) | |
download | gitlab-ce-8aab944cc5e9b58ecc6f052db7cb8985a8a0ba51.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/1_settings.rb | 3 | ||||
-rw-r--r-- | config/initializers/postgres_partitioning.rb | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 597b5626435..9f3d813fcd2 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -503,6 +503,9 @@ Settings.cron_jobs['authorized_project_update_periodic_recalculate_worker']['job Settings.cron_jobs['update_container_registry_info_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['update_container_registry_info_worker']['cron'] ||= '0 0 * * *' Settings.cron_jobs['update_container_registry_info_worker']['job_class'] = 'UpdateContainerRegistryInfoWorker' +Settings.cron_jobs['postgres_dynamic_partitions_creator'] ||= Settingslogic.new({}) +Settings.cron_jobs['postgres_dynamic_partitions_creator']['cron'] ||= '21 */6 * * *' +Settings.cron_jobs['postgres_dynamic_partitions_creator']['job_class'] ||= 'PartitionCreationWorker' Gitlab.ee do Settings.cron_jobs['adjourned_group_deletion_worker'] ||= Settingslogic.new({}) diff --git a/config/initializers/postgres_partitioning.rb b/config/initializers/postgres_partitioning.rb new file mode 100644 index 00000000000..6c8a72d9bd5 --- /dev/null +++ b/config/initializers/postgres_partitioning.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +# Make sure we have loaded partitioned models here +# (even with eager loading disabled). + +begin + Gitlab::Database::Partitioning::PartitionCreator.new.create_partitions +rescue ActiveRecord::ActiveRecordError, PG::Error + # ignore - happens when Rake tasks yet have to create a database, e.g. for testing +end |