Skip to content

Commit

Permalink
Remove duplicated shutdown method
Browse files Browse the repository at this point in the history
The shutdown method on the NodeManager was duplicated, and only the main
one needed to stay. There's also no need to check if the _threadpool
attribute exists, because it always does.

This was found while working on YAN-975.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed Jun 2, 2022
1 parent c3b419a commit e94acb4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions daliuge-engine/dlg/manager/node_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,10 @@ def start(self):
Starts any background task required by this Node Manager
"""

@abc.abstractmethod
def shutdown(self):
"""
Stops any pending background task run by this Node Manager
"""
if self._threadpool:
self._threadpool.close()
self._threadpool.join()

@abc.abstractmethod
def subscribe(self, host, port):
Expand Down Expand Up @@ -373,11 +372,6 @@ def call_drop(self, sessionId, uid, method, *args):
self._check_session_id(sessionId)
return self._sessions[sessionId].call_drop(uid, method, *args)

def shutdown(self):
if hasattr(self, "_threadpool") and self._threadpool is not None:
self._threadpool.close()
self._threadpool.join()


class ZMQPubSubMixIn(object):
"""
Expand Down

0 comments on commit e94acb4

Please sign in to comment.