Commit 67dba08f authored by Ben Bodenmiller's avatar Ben Bodenmiller Committed by Robert Speicher

Run pipeline_schedule_worker at every 10th minute from 3 through 59

parent d225db93
---
title: Run pipeline_schedule_worker at every 10th minute from 3 through 59
merge_request: 52756
author: Ben Bodenmiller (@bbodenmiller)
type: changed
...@@ -435,7 +435,7 @@ production: &base ...@@ -435,7 +435,7 @@ production: &base
cron: "0 * * * *" cron: "0 * * * *"
# Execute scheduled triggers # Execute scheduled triggers
pipeline_schedule_worker: pipeline_schedule_worker:
cron: "19 * * * *" cron: "3-59/10 * * * *"
# Remove expired build artifacts # Remove expired build artifacts
expire_build_artifacts_worker: expire_build_artifacts_worker:
cron: "*/7 * * * *" cron: "*/7 * * * *"
......
...@@ -416,7 +416,7 @@ Settings.cron_jobs['stuck_ci_jobs_worker'] ||= Settingslogic.new({}) ...@@ -416,7 +416,7 @@ Settings.cron_jobs['stuck_ci_jobs_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['stuck_ci_jobs_worker']['cron'] ||= '0 * * * *' Settings.cron_jobs['stuck_ci_jobs_worker']['cron'] ||= '0 * * * *'
Settings.cron_jobs['stuck_ci_jobs_worker']['job_class'] = 'StuckCiJobsWorker' Settings.cron_jobs['stuck_ci_jobs_worker']['job_class'] = 'StuckCiJobsWorker'
Settings.cron_jobs['pipeline_schedule_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['pipeline_schedule_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['pipeline_schedule_worker']['cron'] ||= '19 * * * *' Settings.cron_jobs['pipeline_schedule_worker']['cron'] ||= '3-59/10 * * * *'
Settings.cron_jobs['pipeline_schedule_worker']['job_class'] = 'PipelineScheduleWorker' Settings.cron_jobs['pipeline_schedule_worker']['job_class'] = 'PipelineScheduleWorker'
Settings.cron_jobs['expire_build_artifacts_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['expire_build_artifacts_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['expire_build_artifacts_worker']['cron'] ||= '*/7 * * * *' Settings.cron_jobs['expire_build_artifacts_worker']['cron'] ||= '*/7 * * * *'
......
...@@ -97,7 +97,7 @@ Any settings or feature limits not listed here are using the defaults listed in ...@@ -97,7 +97,7 @@ Any settings or feature limits not listed here are using the defaults listed in
| ----------- | ----------------- | ------------- | | ----------- | ----------------- | ------------- |
| Artifacts maximum size (compressed) | 1G | 100M | | Artifacts maximum size (compressed) | 1G | 100M |
| Artifacts [expiry time](../../ci/yaml/README.md#artifactsexpire_in) | From June 22, 2020, deleted after 30 days unless otherwise specified (artifacts created before that date have no expiry). | deleted after 30 days unless otherwise specified | | Artifacts [expiry time](../../ci/yaml/README.md#artifactsexpire_in) | From June 22, 2020, deleted after 30 days unless otherwise specified (artifacts created before that date have no expiry). | deleted after 30 days unless otherwise specified |
| Scheduled Pipeline Cron | `*/5 * * * *` | `19 * * * *` | | Scheduled Pipeline Cron | `*/5 * * * *` | `3-59/10 * * * *` |
| [Max jobs in active pipelines](../../administration/instance_limits.md#number-of-jobs-in-active-pipelines) | `500` for Free tier, unlimited otherwise | Unlimited | [Max jobs in active pipelines](../../administration/instance_limits.md#number-of-jobs-in-active-pipelines) | `500` for Free tier, unlimited otherwise | Unlimited
| [Max CI/CD subscriptions to a project](../../administration/instance_limits.md#number-of-cicd-subscriptions-to-a-project) | `2` | Unlimited | | [Max CI/CD subscriptions to a project](../../administration/instance_limits.md#number-of-cicd-subscriptions-to-a-project) | `2` | Unlimited |
| [Max pipeline schedules in projects](../../administration/instance_limits.md#number-of-pipeline-schedules) | `10` for Free tier, `50` for all paid tiers | Unlimited | | [Max pipeline schedules in projects](../../administration/instance_limits.md#number-of-pipeline-schedules) | `10` for Free tier, `50` for all paid tiers | Unlimited |
......
...@@ -63,6 +63,17 @@ RSpec.describe Gitlab::Ci::CronParser do ...@@ -63,6 +63,17 @@ RSpec.describe Gitlab::Ci::CronParser do
end end
end end
context 'when range and slash used' do
let(:cron) { '3-59/10 * * * *' }
let(:cron_timezone) { 'UTC' }
it_behaves_like returns_time_for_epoch
it 'returns specific time' do
expect(subject.min).to be_in([3, 13, 23, 33, 43, 53])
end
end
context 'when cron_timezone is TZInfo format' do context 'when cron_timezone is TZInfo format' do
before do before do
allow(Time).to receive(:zone) allow(Time).to receive(:zone)
......
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