Guard against concurrent invocations of hydra-queue-runner
[?]
Jun 22, 2015, 12:24 PM
K5G5GZY7D7KWVR5RAGZFHH3ZPG5OCLZT4HZ6XIJJ7YYVUMC2CTZQCDependencies
- [2]
PLOZBRTRAdd command ‘hydra-queue-runner --status’ to show current status - [*]
24BMQDZAStart of single-process hydra-queue-runner - [*]
GS4BE6TBAsynchronously compress build logs - [*]
NJJ7H64SVery basic multi-threaded queue runner
Change contents
- edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 29
#include "pathlocks.hh" - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 310
/* Acquire the global queue runner lock, or null if somebody elsehas it. */std::shared_ptr<PathLocks> acquireGlobalLock(); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1401
}std::shared_ptr<PathLocks> State::acquireGlobalLock(){Path lockPath = hydraData + "/queue-runner";auto lock = std::make_shared<PathLocks>();if (!lock->lockPaths(PathSet({lockPath}), "", false)) return 0;return lock; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1524
auto lock = acquireGlobalLock();if (!lock)throw Error("hydra-queue-runner is currently running"); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1542[6.3200][2.3753]
auto lock = acquireGlobalLock();if (!lock)throw Error("hydra-queue-runner is already running");