Skip to content

Commit

Permalink
Merge pull request #7710 from fstagni/90_fixes6
Browse files Browse the repository at this point in the history
[9.0] removal of outdated code
  • Loading branch information
fstagni committed Jul 5, 2024
2 parents e745c9e + 42a6f13 commit fb61e33
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 331 deletions.
308 changes: 0 additions & 308 deletions src/DIRAC/WorkloadManagementSystem/Agent/OptimizerModule.py

This file was deleted.

23 changes: 0 additions & 23 deletions src/DIRAC/WorkloadManagementSystem/Service/JobMonitoringHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from DIRAC.Core.Utilities.JEncode import strToIntDict
from DIRAC.Core.Utilities.ObjectLoader import ObjectLoader
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
from DIRAC.WorkloadManagementSystem.Client import JobStatus
from DIRAC.WorkloadManagementSystem.Client import JobMinorStatus
from DIRAC.WorkloadManagementSystem.Client.PilotManagerClient import PilotManagerClient
from DIRAC.WorkloadManagementSystem.Service.JobPolicy import JobPolicy, RIGHT_GET_INFO

Expand Down Expand Up @@ -376,27 +374,6 @@ def export_getJobPageSummaryWeb(self, selectDict, sortList, startItem, maxItems,
for jobDict in summaryDict.values():
if not jobDict.get("HeartBeatTime") or jobDict["HeartBeatTime"] == "None":
jobDict["LastSignOfLife"] = jobDict["LastUpdateTime"]
elif False:
# Code kept in case this is not working, but if we update the HeartBeatTime
# at each status change from the jobs it should not be needed
# Items are always strings
lastTime = TimeUtilities.fromString(jobDict["LastUpdateTime"])
hbTime = TimeUtilities.fromString(jobDict["HeartBeatTime"])
# Try and identify statuses not set by the job itself as too expensive to get logging info
# Not only Stalled jobs but also Failed jobs because Stalled
if (
hbTime > lastTime
or jobDict["Status"] == JobStatus.STALLED
or jobDict["MinorStatus"]
in (
JobMinorStatus.REQUESTS_DONE,
JobMinorStatus.STALLED_PILOT_NOT_RUNNING,
)
or jobDict["MinorStatus"].startswith("Stalling")
):
jobDict["LastSignOfLife"] = jobDict["HeartBeatTime"]
else:
jobDict["LastSignOfLife"] = jobDict["LastUpdateTime"]
else:
jobDict["LastSignOfLife"] = jobDict["HeartBeatTime"]

Expand Down

0 comments on commit fb61e33

Please sign in to comment.