Skip to content
Snippets Groups Projects
Commit 0341b242 authored by Adam Hegyi's avatar Adam Hegyi :coffee: Committed by DJ Mountney
Browse files

Add instance statistics cron worker

parent d5209202
No related branches found
No related tags found
No related merge requests found
---
title: Add instance statistics cron worker
merge_request: 4567
author:
type: other
Loading
Loading
@@ -145,6 +145,7 @@ external_url 'GENERATED_EXTERNAL_URL'
# gitlab_rails['pages_domain_removal_cron_worker'] = "47 0 * * *"
# gitlab_rails['schedule_migrate_external_diffs_worker_cron'] = "15 * * * *"
# gitlab_rails['ci_platform_metrics_update_cron_worker'] = '47 9 * * *'
# gitlab_rails['analytics_instance_statistics_count_job_trigger_worker_cron'] = "50 23 */1 * *"
 
### Webhook Settings
###! Number of seconds to wait for HTTP response after sending webhook HTTP POST
Loading
Loading
Loading
Loading
@@ -138,6 +138,7 @@ default['gitlab']['gitlab-rails']['geo_secondary_registry_consistency_worker'] =
default['gitlab']['gitlab-rails']['geo_prune_event_log_worker_cron'] = nil
default['gitlab']['gitlab-rails']['geo_repository_verification_primary_batch_worker_cron'] = nil
default['gitlab']['gitlab-rails']['geo_repository_verification_secondary_scheduler_worker_cron'] = nil
default['gitlab']['gitlab-rails']['analytics_instance_statistics_count_job_trigger_worker_cron'] = nil
default['gitlab']['gitlab-rails']['pseudonymizer_worker_cron'] = nil
default['gitlab']['gitlab-rails']['elastic_index_bulk_cron'] = nil
default['gitlab']['gitlab-rails']['incoming_email_enabled'] = false
Loading
Loading
Loading
Loading
@@ -490,6 +490,12 @@ production: &base
cron: "<%= @elastic_index_bulk_cron %>"
<% end %>
 
# Worker for triggering counter jobs for instance statistics
<% unless @analytics_instance_statistics_count_job_trigger_worker_cron.nil? %>
analytics_instance_statistics_count_job_trigger_worker:
cron: "<%= @analytics_instance_statistics_count_job_trigger_worker_cron %>"
<% end %>
## Geo
# NOTE: These settings will only take effect if Geo is enabled
geo:
Loading
Loading
Loading
Loading
@@ -1634,6 +1634,28 @@ RSpec.describe 'gitlab::gitlab-rails' do
end
end
 
context 'when instance statistics counter trigger worker is configured' do
it 'sets the cron value' do
stub_gitlab_rb(gitlab_rails: { analytics_instance_statistics_count_job_trigger_worker_cron: '1 2 3 4 5' })
expect(chef_run).to create_templatesymlink('Create a gitlab.yml and create a symlink to Rails root').with_variables(
hash_including(
'analytics_instance_statistics_count_job_trigger_worker_cron' => '1 2 3 4 5'
)
)
end
end
context 'when instance statistics counter trigger worker is not configured' do
it 'does not set the cron value' do
expect(chef_run).to create_templatesymlink('Create a gitlab.yml and create a symlink to Rails root').with_variables(
hash_including(
'analytics_instance_statistics_count_job_trigger_worker_cron' => nil
)
)
end
end
context 'Cron workers for other EE functionality' do
where(:gitlab_rb_key, :gitlab_yml_key) do
:pseudonymizer_worker_cron | 'pseudonymizer_worker_cron'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment