@@ -306,7 +306,7 @@ def getPastSessionIds(self) -> list[str]:
306
306
for path in self ._past_session_manager .past_sessions (self ._sessionIds )
307
307
]
308
308
309
- def _do_in_host (self , action , sessionId , exceptions , f , collect , port , iterable ):
309
+ def _do_in_host (self , action , sessionId , exceptions , f , collect , port , iterable , ** kwargs ):
310
310
"""
311
311
Replication of commands to underlying drop managers
312
312
If "collect" is given, then individual results are also kept in the given
@@ -324,7 +324,7 @@ def _do_in_host(self, action, sessionId, exceptions, f, collect, port, iterable)
324
324
325
325
try :
326
326
with self .dmAt (host ) as dm :
327
- res = f (dm , iterable , sessionId )
327
+ res = f (dm , iterable , sessionId , ** kwargs )
328
328
329
329
if isinstance (collect , dict ):
330
330
collect .update (res )
@@ -342,7 +342,8 @@ def _do_in_host(self, action, sessionId, exceptions, f, collect, port, iterable)
342
342
f ,
343
343
)
344
344
345
- def replicate (self , sessionId , f , action , collect = None , iterable = None , port = None ):
345
+ def replicate (self , sessionId , f , action , collect = None , iterable = None , port = None ,
346
+ ** kwargs ):
346
347
"""
347
348
Replicates the given function call on each of the underlying drop managers
348
349
"""
@@ -352,7 +353,8 @@ def replicate(self, sessionId, f, action, collect=None, iterable=None, port=None
352
353
logger .debug ("Replicating command: %s on hosts: %s" , f , iterable )
353
354
self ._tp .map (
354
355
functools .partial (
355
- self ._do_in_host , action , sessionId , thrExs , f , collect , port
356
+ self ._do_in_host , action , sessionId , thrExs , f , collect , port ,
357
+ ** kwargs
356
358
),
357
359
iterable ,
358
360
)
@@ -598,6 +600,30 @@ def getGraphStatus(self, sessionId):
598
600
)
599
601
return allStatus
600
602
603
+ def getDropStatus (self , sessionId , dropId ):
604
+ allstatus = {}
605
+ self .replicate (
606
+ sessionId ,
607
+ # {"session": sessionId, "drop": dropId},
608
+ self ._getDropStatus ,
609
+ "getting graph status" ,
610
+ collect = allstatus ,
611
+ dropId = dropId
612
+ )
613
+ return allstatus
614
+
615
+ def _getDropStatus (self , dm , host , sessionId , dropId ):
616
+ """
617
+ See session.getDropLogs()
618
+
619
+ :param dm:
620
+ :param host:
621
+ :param sessionId:
622
+ :param dropId:
623
+ :return: JSON of status logs and DROP information
624
+ """
625
+ return dm .getDropStatus (sessionId , dropId )
626
+
601
627
def _getGraph (self , dm , host , sessionId ):
602
628
return dm .getGraph (sessionId )
603
629
0 commit comments