diff options
author | Azul <azul@riseup.net> | 2017-07-18 13:55:06 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2017-07-18 13:55:06 +0200 |
commit | 71207a9ebe82a7ac62c0ff32d8b34dbdf953f927 (patch) | |
tree | fd18c39922d347336722351844d1e6f0df41bea3 | |
parent | 396e4cf638670bf00b8b929be154218a76b960b4 (diff) |
minor: increase frequency of gitlab runs
also print the duration of going through all projects.
-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 |