1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

monitor: Detailed logging EDLogs.stop()

# Conflicts:
#	monitor.py
This commit is contained in:
Athanasius 2021-03-22 12:59:58 +00:00
parent 7ebf2a553a
commit 4a84d9c341

View File

@ -191,6 +191,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
return True
def stop(self):
"""Stop journal monitoring."""
logger.debug('Stopping monitoring Journal')
self.currentdir = None
@ -207,12 +208,17 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
self.coordinates = None
self.systemaddress = None
self.is_beta = False
if self.observed:
logger.debug('self.observed: Calling unschedule_all()')
self.observed = None
self.observer.unschedule_all()
logger.debug('Done')
self.thread = None # Orphan the worker thread - will terminate at next poll
logger.debug('Done.')
def close(self):
"""Close journal monitoring."""
logger.debug('Calling self.stop()...')