Skip to content

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?

What are the relevant issue numbers?

Spotted while working on #25774 (moved)

Edited by username-removed-128633

Merge request reports