From 118b4686fb21f87b5922c9d2acdc3b6e596fe5ac Mon Sep 17 00:00:00 2001
From: Pedro Pombeiro <noreply@pedro.pombei.ro>
Date: Fri, 19 May 2023 14:58:58 +0200
Subject: [PATCH] Make ci_runners_stale_machines_cleanup_worker job run more
 frequently

Changelog: changed
---
 config/gitlab.yml.example         | 2 +-
 config/initializers/1_settings.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index e46bc5b646ca..7968d46dad4b 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -584,7 +584,7 @@ production: &base
 
     # Periodically clean up stale runner machines.
     ci_runners_stale_machines_cleanup_worker:
-      cron: "36 4 * * *"
+      cron: "36 * * * *"
 
   # GitLab EE only jobs. These jobs are automatically enabled for an EE
   # installation, and ignored for a CE installation.
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index d096174fca3a..d4c7800e654d 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -674,7 +674,7 @@
 Settings.cron_jobs['users_migrate_records_to_ghost_user_in_batches_worker']['cron'] ||= '*/2 * * * *'
 Settings.cron_jobs['users_migrate_records_to_ghost_user_in_batches_worker']['job_class'] = 'Users::MigrateRecordsToGhostUserInBatchesWorker'
 Settings.cron_jobs['ci_runners_stale_machines_cleanup_worker'] ||= {}
-Settings.cron_jobs['ci_runners_stale_machines_cleanup_worker']['cron'] ||= '36 4 * * *'
+Settings.cron_jobs['ci_runners_stale_machines_cleanup_worker']['cron'] ||= '36 * * * *'
 Settings.cron_jobs['ci_runners_stale_machines_cleanup_worker']['job_class'] = 'Ci::Runners::StaleMachinesCleanupCronWorker'
 Settings.cron_jobs['packages_cleanup_delete_orphaned_dependencies_worker'] ||= {}
 Settings.cron_jobs['packages_cleanup_delete_orphaned_dependencies_worker']['cron'] ||= '*/10 * * * *'
-- 
GitLab