Commit ab28e0be authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '326114_change_sync_seat_link_worker_cron_job_time' into 'master'

Change SyncSeatLinkWorker cron job execution time

See merge request gitlab-org/gitlab!60401
parents 6381f606 cccfbcb3
......@@ -671,7 +671,7 @@ Gitlab.ee do
Settings.cron_jobs['elastic_migration_worker']['cron'] ||= '*/30 * * * *'
Settings.cron_jobs['elastic_migration_worker']['job_class'] ||= 'Elastic::MigrationWorker'
Settings.cron_jobs['sync_seat_link_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['sync_seat_link_worker']['cron'] ||= "#{rand(60)} 0 * * *"
Settings.cron_jobs['sync_seat_link_worker']['cron'] ||= "#{rand(60)} 3 * * * UTC"
Settings.cron_jobs['sync_seat_link_worker']['job_class'] = 'SyncSeatLinkWorker'
Settings.cron_jobs['web_application_firewall_metrics_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['web_application_firewall_metrics_worker']['cron'] ||= '0 1 * * 0'
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe '1_settings' do
context 'cron jobs' do
subject(:cron_jobs) { Settings.cron_jobs }
context 'sync_seat_link_worker cron job' do
# explicit use of UTC for self-managed instances to ensure job runs after a Customers Portal job
it 'schedules the job at the correct time' do
expect(cron_jobs.dig('sync_seat_link_worker', 'cron')).to match(/[1-5]{0,1}[0-9]{1,2} 3 \* \* \* UTC/)
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment