mirror of
https://gitlab.cs.uni-saarland.de/hpc/cc-condor-sync.git
synced 2024-12-25 13:09:06 +01:00
Don't monitor jobs with +NoMonitoring=true
.
This commit is contained in:
parent
0a70035977
commit
e7f54aa1b7
@ -13,6 +13,7 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <condition_variable>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <deque>
|
||||
@ -379,6 +380,15 @@ void CCSyncPlugin::sendPostRequest(const std::string &route,
|
||||
}
|
||||
}
|
||||
|
||||
bool toBool(const std::string &value) {
|
||||
if (std::atoi(value.c_str()))
|
||||
return true;
|
||||
std::string lower;
|
||||
std::transform(value.begin(), value.end(), std::back_inserter(lower),
|
||||
::tolower);
|
||||
return lower == "true" || lower == "yes" || lower == "on";
|
||||
}
|
||||
|
||||
void CCSyncPlugin::endTransaction() {
|
||||
if (initializing) { // HTCondor bug? We should'n be receiving events before
|
||||
// initialization is done. We will ignore them if it
|
||||
@ -412,6 +422,13 @@ void CCSyncPlugin::endTransaction() {
|
||||
continue;
|
||||
} else
|
||||
continue;
|
||||
if (auto noMonitoringIt = job.find("NoMonitoring");
|
||||
noMonitoringIt != job.end() && toBool(noMonitoringIt->second)) {
|
||||
dprintf(D_VERBOSE,
|
||||
"Upon NoMonitoring ClassAd, not monitoring job %d.%d\n",
|
||||
jobId.first, jobId.second);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state == RUNNING) {
|
||||
auto jobBatchNameIt = job.find("JobBatchName");
|
||||
|
Loading…
Reference in New Issue
Block a user