hydra-evaluator: make the logic of the scheduler easier to read
[?]
Mar 3, 2020, 11:17 PM
K6CGDFOTL2YODZPNT36RKQ3JW435323R52LLNWW4XELWR4JRDH3ACDependencies
Change contents
- edit in src/hydra-evaluator/hydra-evaluator.cc at line 132
bool shouldEvaluate(Jobset & jobset){if (jobset.pid != -1) {// Already running.return false;}if (jobset.triggerTime == std::numeric_limits<time_t>::max()) {// An evaluation of this Jobset is requestedreturn true;}if (jobset.checkInterval <= 0) {// Automatic scheduling is disabled. We allow requested// evaluations, but never schedule start one.return false;}if (jobset.lastCheckedTime + jobset.checkInterval <= time(0)) {// Time to schedule a fresh evaluationreturn true;}return false;} - edit in src/hydra-evaluator/hydra-evaluator.cc at line 162
time_t now = time(0); - replacement in src/hydra-evaluator/hydra-evaluator.cc at line 167
(i->second.pid == -1 &&(i->second.triggerTime != std::numeric_limits<time_t>::max() ||(i->second.checkInterval > 0 && i->second.lastCheckedTime + i->second.checkInterval <= now))))(i->second.evaluation_style && shouldEvaluate(i->second)))