Commit c1837b77 authored by Kamil Trzciński's avatar Kamil Trzciński

Update ONLINE_CONTACT_TIMEOUT of Runner

This increases a timeout that Runner is considered
online. This is due to fact of two aspects that impact
how often we update DB entry:
- Runner being terminated by Workhorse, thus waiting
  on queue notification
- Rate of updating DB column

The timeout to consider Runner online (by DB)
needs to be aligned with these two timeouts,
otherwise runner can be wrongly assumed as not-online.
parent 67c1ee38
......@@ -23,10 +23,17 @@ module Ci
project_type: 3
}
ONLINE_CONTACT_TIMEOUT = 1.hour
# This `ONLINE_CONTACT_TIMEOUT` needs to be larger than
# `RUNNER_QUEUE_EXPIRY_TIME+UPDATE_CONTACT_COLUMN_EVERY`
#
ONLINE_CONTACT_TIMEOUT = 2.hours
# The `RUNNER_QUEUE_EXPIRY_TIME` indicates the longest interval that
# Runner request needs to be refreshed by Rails instead of being handled
# by Workhorse
RUNNER_QUEUE_EXPIRY_TIME = 1.hour
# This needs to be less than `ONLINE_CONTACT_TIMEOUT`
# The `UPDATE_CONTACT_COLUMN_EVERY` defines how often the Runner DB entry can be updated
UPDATE_CONTACT_COLUMN_EVERY = (40.minutes..55.minutes).freeze
AVAILABLE_TYPES_LEGACY = %w[specific shared].freeze
......
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