Fix offline runner detection
What does this MR do?
It fixes a bug in the detection of online runners.
A runner is considered online if it has contacted the API at leas once in the last hour. Unfortunately, this time reference is taken as constant at class loading time, as a result every runner that contacted the API any time later than 1 hour before the process starting time is considered online.
This also has the side effect that checking if a runner is online from a rails console, or in cron spawned task, may give a different result.
Are there points in the code the reviewer needs to double check?
No
Why was this MR needed?
It's a bug fix.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Spotted while working on #25774 (moved)
Edited by username-removed-128633