Remove some debugging code

This commit is contained in:
2022-09-05 07:20:30 +01:00
parent a1b193c6da
commit ddcfa614ad
2 changed files with 0 additions and 16 deletions

6
db.py
View File

@@ -22,7 +22,6 @@ def store_message(msg):
Store a message into Manticore
:param msg: dict
"""
print("DISCORD MSGLEN", len(msg["msg"]))
# normalise fields
for key, value in list(msg.items()):
if value is None:
@@ -52,14 +51,12 @@ def store_message_bulk(data):
Store a message into Manticore
:param msg: dict
"""
print("BULK", len(data))
if not data:
return
# 10000: maximum inserts we can submit to
# Manticore as of Sept 2022
split_posts = array_split(data, ceil(len(data) / 10000))
for messages in split_posts:
print("PROCESSING SPLIT OF", len(messages), "MESSAGES")
total = []
for msg in messages:
# normalise fields
@@ -86,9 +83,6 @@ def store_message_bulk(data):
print(api_response)
except ApiException as e:
print("Exception when calling IndexApi->bulk: %s\n" % e)
print("FINISHED PROCESSING SPLIT")
print("BULK FINISH")
def update_schema():