Skip to content

Commit 061b3a0

Browse files
committed
fix: removed useless RPC call
1 parent 93f7d29 commit 061b3a0

File tree

5 files changed

+0
-80
lines changed

5 files changed

+0
-80
lines changed

src/DIRAC/AccountingSystem/Client/AccountingCLI.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def showTraceback(self):
5757
traceback.print_tb(sys.exc_info()[2])
5858
print("________________________\n")
5959

60-
6160
def do_showRegisteredTypes(self, args):
6261
"""
6362
Get a list of registered types

src/DIRAC/MonitoringSystem/DB/MonitoringDB.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -447,26 +447,6 @@ def __getRawData(self, typeName, condDict, size=-1):
447447
records.append({paramName: getattr(resObj["_source"], paramName) for paramName in paramNames})
448448
return S_OK(records)
449449

450-
def getLastDayData(self, typeName, condDict):
451-
"""
452-
It returns the last day data for a given monitoring type.
453-
454-
:returns: for example
455-
456-
.. code-block:: python
457-
458-
{'sort': [{'timestamp': {'order': 'desc'}}],
459-
'query': {'bool': {'must': [{'match': {'host': 'dzmathe.cern.ch'}},
460-
{'match': {'component': 'Bookkeeping_BookkeepingManager'}}]}}}
461-
462-
:param str typeName: name of the monitoring type
463-
:param dict condDict: conditions for the query
464-
465-
* key -> name of the field
466-
* value -> list of possible values
467-
"""
468-
return self.__getRawData(typeName, condDict)
469-
470450
def getLimitedData(self, typeName, condDict, size=10):
471451
"""
472452
Returns a list of records for a given selection.

src/DIRAC/MonitoringSystem/Service/MonitoringHandler.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -244,24 +244,6 @@ def export_getReport(self, reportRequest):
244244
reportRequest["generatePlot"] = False
245245
return reporter.generate(reportRequest)
246246

247-
types_addMonitoringRecords = [str, list]
248-
249-
def export_addMonitoringRecords(self, monitoringtype, data):
250-
"""
251-
Bulk insert data directly to the given monitoring type.
252-
253-
:param str monitoringtype: monitoring type name
254-
:param list data: list of documents
255-
:returns: S_OK or S_ERROR
256-
"""
257-
258-
retVal = self.__db.getIndexName(monitoringtype)
259-
if not retVal["OK"]:
260-
return retVal
261-
prefix = retVal["Value"]
262-
gLogger.debug("addMonitoringRecords:", prefix)
263-
return self.__db.bulk_index(prefix, data)
264-
265247
types_addRecords = [str, str, list]
266248

267249
def export_addRecords(self, indexname, monitoringType, data):
@@ -290,21 +272,6 @@ def export_deleteIndex(self, indexName):
290272
gLogger.debug("delete index:", indexName)
291273
return self.__db.deleteIndex(indexName)
292274

293-
types_getLastDayData = [str, dict]
294-
295-
def export_getLastDayData(self, typeName, condDict):
296-
"""
297-
It returns the data from the last day index. Note: we create daily indexes.
298-
299-
:param str typeName: name of the monitoring type
300-
:param dict condDict: conditions for the query
301-
302-
* key -> name of the field
303-
* value -> list of possible values
304-
"""
305-
306-
return self.__db.getLastDayData(typeName, condDict)
307-
308275
types_getLimitedDat = [str, dict, int]
309276

310277
def export_getLimitedData(self, typeName, condDict, size):

tests/Integration/AccountingSystem/Test_ReportsClient.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,3 @@ def test_addAndRemoveStorageOccupancy():
4949
"StorageElement",
5050
)
5151
assert res["OK"], res["Message"]
52-
53-
# now removing that record
54-
res = gDataStoreClient.remove(record)
55-
assert res["OK"], res["Message"]

tests/Integration/Monitoring/Test_MonitoringSystem.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -245,25 +245,3 @@ def test_getReport(putAndDelete):
245245
},
246246
"granularity": 1800000,
247247
}
248-
249-
250-
def test_getLastDayData(putAndDelete):
251-
params = {"Status": "Running", "Site": "LCG.NIKHEF.nl"}
252-
result = client.getLastDayData("WMSHistory", params)
253-
assert result["OK"], result["Message"]
254-
assert len(result["Value"]) == 2
255-
assert sorted(result["Value"][0]) == sorted(
256-
[
257-
"Status",
258-
"Jobs",
259-
"JobSplitType",
260-
"timestamp",
261-
"MinorStatus",
262-
"Site",
263-
"Reschedules",
264-
"ApplicationStatus",
265-
"User",
266-
"JobGroup",
267-
"UserGroup",
268-
]
269-
)

0 commit comments

Comments
 (0)