From bf3d53d415bdc8daef7313c8db0916056abff5f4 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 18 Jul 2017 13:55:06 +0200 Subject: minor: increase frequency of gitlab runs also print the duration of going through all projects. --- jobs/gitlab_build_status.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jobs/gitlab_build_status.rb b/jobs/gitlab_build_status.rb index 7febcae..f2f669a 100644 --- a/jobs/gitlab_build_status.rb +++ b/jobs/gitlab_build_status.rb @@ -1,8 +1,9 @@ require 'gitlab_stats' -SCHEDULER.every '3000s', :first_in => 0 do +SCHEDULER.every '300s', :first_in => 0 do broken_builds = [] + started = Time.now GitlabStats.projects.each do |proj| GitlabStats.add_pipeline_stats_to proj @@ -16,4 +17,5 @@ SCHEDULER.every '3000s', :first_in => 0 do failed = broken_builds.size > 0 send_event('gitlab-builds', { failed: failed, header: "Gitlab builds", broken_builds: broken_builds }) + puts "Going through all projects took: #{started - Time.now}." end -- cgit v1.2.3