1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-06-02 08:31:16 +03:00

EDDN: Drop any 'unknown schema' messages so they're not retried

This commit is contained in:
Athanasius 2021-10-19 16:01:54 +01:00
parent 9a58da57cd
commit 3ec9c81e19
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -298,7 +298,10 @@ Msg:\n{msg}'''
if unknown_schema := self.UNKNOWN_SCHEMA_RE.match(e.response.text):
logger.debug(f"EDDN doesn't (yet?) know about schema: {unknown_schema['schema_name']}"
f"/{unknown_schema['schema_version']}")
# return # Pretend it went OK so this message isn't retried
# NB: This dropping is to cater for the time when EDDN
# doesn't *yet* support a new schema.
self.replaylog.pop(0) # Drop the message
self.flush() # Truncates the file, then writes the extant data
else:
status['text'] = self.http_error_to_log(e)