Periodically clear orphaned build steps
These are build steps that remain "busy" in the database even though they have finished, because they couldn't be updated (e.g. due to a PostgreSQL connection problem). To prevent them from showing up as busy in the "Machine status" page, we now periodically purge them.
This commit is contained in:
@ -362,6 +362,11 @@ private:
|
||||
time_t lastStatusLogged = 0;
|
||||
const int statusLogInterval = 300;
|
||||
|
||||
/* Steps that were busy while we encounted a PostgreSQL
|
||||
error. These need to be cleared at a later time to prevent them
|
||||
from showing up as busy until the queue runner is restarted. */
|
||||
nix::Sync<std::set<std::pair<BuildID, int>>> orphanedSteps;
|
||||
|
||||
public:
|
||||
State();
|
||||
|
||||
|
Reference in New Issue
Block a user