Remove some debugging code
This commit is contained in:
6
db.py
6
db.py
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user