diff options
author | Azul <azul@riseup.net> | 2017-07-18 13:55:06 +0200 |
---|---|---|
committer | Varac <varac@leap.se> | 2017-10-16 13:20:43 +0200 |
commit | bf3d53d415bdc8daef7313c8db0916056abff5f4 (patch) | |
tree | 00198809c956d855f2c5cc1981994b7c215eff27 /jobs | |
parent | b207ea5f24cb52d5818d04d2b0c872cc8598628e (diff) |
minor: increase frequency of gitlab runs
also print the duration of going through all projects.
Diffstat (limited to 'jobs')
-rw-r--r-- | jobs/gitlab_build_status.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |