Skip to content

Commit e8e4dff

Browse files
committed
fix: Add SiteDirector string choice for sendPilotSubmissionMonitoring()
1 parent 57deff0 commit e8e4dff

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

src/DIRAC/MonitoringSystem/private/Plotters/PilotMonitoringPlotter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from DIRAC.MonitoringSystem.Client.Types.PilotMonitoring import PilotMonitoring
88
from DIRAC.MonitoringSystem.private.Plotters.BasePlotter import BasePlotter
99

10-
__RCSID__ = "$Id$"
11-
1210

1311
class WMSHistoryPlotter(BasePlotter):
1412

@@ -95,7 +93,7 @@ def _plotNumSucceeded(self, reportRequest, plotInfo, filename):
9593
:return: S_OK or S_ERROR { 'plot' : value1, 'thumbnail' : value2 } value1 and value2 are TRUE/FALSE
9694
"""
9795
metadata = {
98-
"title": "Submissions by %s" % reportRequest["grouping"],
96+
"title": "SuSubmissions by %s" % reportRequest["grouping"],
9997
"starttime": reportRequest["startTime"],
10098
"endtime": reportRequest["endTime"],
10199
"span": plotInfo["granularity"],

src/DIRAC/MonitoringSystem/private/Plotters/WMSHistoryPlotter.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
"""
22
This class is used to define the plot using the plot attributes.
33
"""
4-
from __future__ import absolute_import
5-
from __future__ import division
6-
from __future__ import print_function
74

85
from DIRAC import S_OK
96

107
from DIRAC.MonitoringSystem.Client.Types.WMSHistory import WMSHistory
118
from DIRAC.MonitoringSystem.private.Plotters.BasePlotter import BasePlotter
129

13-
__RCSID__ = "$Id$"
14-
1510

1611
class WMSHistoryPlotter(BasePlotter):
1712

src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,10 +1398,16 @@ def sendPilotSubmissionMonitoring(self, siteName, ceName, queueName, numTotal, n
13981398
"""
13991399

14001400
pilotMonitoringReporter = MonitoringReporter(monitoringType="PilotMonitoring")
1401+
1402+
if hasattr(self, "_AgentModule__moduleProperties"):
1403+
siteDirName = self.am_getModuleParam("agentName")
1404+
else: # In case it is not executed as agent
1405+
siteDirName = "Client"
1406+
14011407
pilotMonitoringData = [
14021408
{
1403-
"HostName": "",
1404-
"SiteDirector": "",
1409+
"HostName": DIRAC.siteName(),
1410+
"SiteDirector": siteDirName,
14051411
"Site": siteName,
14061412
"CE": ceName,
14071413
"Queue": queueName,

0 commit comments

Comments
 (0)