aboutsummaryrefslogtreecommitdiffstats
path: root/python/api_quotes/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/api_quotes/__main__.py')
-rw-r--r--python/api_quotes/__main__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/api_quotes/__main__.py b/python/api_quotes/__main__.py
index 59597e39..eae330d3 100644
--- a/python/api_quotes/__main__.py
+++ b/python/api_quotes/__main__.py
@@ -20,7 +20,7 @@ def process_asset_class(asset_class, start_from, end):
if data := MarkitAPI.get_data(asset_class, start_from):
for (quoteid, receiveddatetime), quotes in data:
if end and (receiveddatetime < end):
- break
+ return
quotes = list(quotes)
# Don't try to insert into DB if already uploaded
if quoteid in already_uploaded:
@@ -33,7 +33,7 @@ def process_asset_class(asset_class, start_from, end):
)
except ValueError as e:
MarkitQuoteKind[asset_class].clear()
- logger.error(f"Couldn't parse {msg_id}: {e}")
+ logger.warning(f"Couldn't parse {msg_id}: {e}")
continue
else:
quote.stage()
@@ -42,13 +42,13 @@ def process_asset_class(asset_class, start_from, end):
# We would also get stuck sometimes without the quoteid being specified
last_val = f"{receiveddatetime},{asset_class}-9480-{quoteid}"
if start_from == last_val:
- break
+ return
else:
start_from = last_val
else:
- break
+ return
except JSONDecodeError:
- logger.error(f"Issue with {asset_class}: {start_from}")
+ print(f"Issue with {asset_class}: {start_from}")
except AttributeError:
MarkitAPI.update_api_key()