Add timeout state for 12hr preemted jobs.

This commit is contained in:
Joachim Meyer 2023-07-06 09:33:24 +02:00
parent e70d377047
commit 8c28b2f287

View File

@ -450,6 +450,15 @@ void CCSyncPlugin::endTransaction() {
std::uint64_t startTime = std::stoull(job["JobCurrentStartDate"]), std::uint64_t startTime = std::stoull(job["JobCurrentStartDate"]),
stopTime = std::stoull(job["EnteredCurrentStatus"]); stopTime = std::stoull(job["EnteredCurrentStatus"]);
std::string jobState = jobStateMap.at(state);
if (state == HELD && jobHasClassAd(job, "HoldReasonCode") &&
std::stoul(job["HoldReasonCode"]) == 3 &&
jobHasClassAd(job, "HoldReasonSubCode") &&
(std::stoul(job["HoldReasonSubCode"]) == 12 ||
std::stoul(job["HoldReasonSubCode"]) == 24)) {
jobState = "timeout";
}
json j = {{"jobId", globalJobIdToInt(jobId)}, json j = {{"jobId", globalJobIdToInt(jobId)},
{"cluster", clusterName}, {"cluster", clusterName},
{"jobState", jobStateMap.at(state)}, {"jobState", jobStateMap.at(state)},