mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-20 08:44:07 +03:00
dashboard: Bail early from process() if in shutdown
This commit is contained in:
parent
50f520ab66
commit
cb9bd30a05
@ -115,6 +115,9 @@ class Dashboard(FileSystemEventHandler):
|
|||||||
|
|
||||||
# Can be called either in watchdog thread or, if polling, in main thread.
|
# Can be called either in watchdog thread or, if polling, in main thread.
|
||||||
def process(self, logfile=None):
|
def process(self, logfile=None):
|
||||||
|
if config.shutting_down():
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(join(self.currentdir, 'Status.json'), 'rb') as h:
|
with open(join(self.currentdir, 'Status.json'), 'rb') as h:
|
||||||
data = h.read().strip()
|
data = h.read().strip()
|
||||||
@ -126,6 +129,7 @@ class Dashboard(FileSystemEventHandler):
|
|||||||
self.status != entry):
|
self.status != entry):
|
||||||
self.status = entry
|
self.status = entry
|
||||||
self.root.event_generate('<<DashboardEvent>>', when="tail")
|
self.root.event_generate('<<DashboardEvent>>', when="tail")
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception('Reading Status.json')
|
logger.exception('Reading Status.json')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user