1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 08:40:34 +03:00

Moved edsm killswitch check

It was causing exit hangs when edsm was disabled
This commit is contained in:
A_D 2020-10-24 09:33:16 +02:00 committed by Athanasius
parent 98b27ee046
commit 10ca50bf5a

View File

@ -509,12 +509,11 @@ def worker() -> None:
logger.debug('Empty queue message, setting closing = True')
closing = True # Try to send any unsent events before we close
if killswitch.is_disabled("plugins.edsm.worker"):
logger.warning('EDSM worker has been disabled via kill switch. Not uploading data.')
continue
retrying = 0
while retrying < 3:
if killswitch.is_disabled("plugins.edsm.worker"):
logger.warning('EDSM worker has been disabled via kill switch. Not uploading data.')
break
try:
if TYPE_CHECKING:
# Tell the type checker that these two are bound.