1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

companion: Update "close down" check for using EDMCAPIRequest

This commit is contained in:
Athanasius 2021-08-23 15:36:21 +01:00
parent dc705b92e5
commit c6f93bd3c6
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -803,11 +803,15 @@ class Session(object):
querytime: int
play_sound: bool
auto_update: bool
# endpoint, querytime, play_sound, auto_update = self.capi_query_queue.get()
query = self.capi_query_queue.get()
if not query.endpoint:
logger.info('Empty queue message, exiting...')
break
if not isinstance(query, EDMCCAPIRequest):
if query is not None:
logger.error("Item from queue wasn't an EDMCCAPIRequest")
break
else:
logger.info('Empty queue message, exiting...')
break
logger.trace_if('capi.worker', f'Processing query: {query.endpoint}')
data: CAPIData