Skip to content

Commit

Permalink
backend: cleanup print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
wagner-intevation committed Jul 1, 2023
1 parent dc930ad commit 5a158f1
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions intelmq_webinput_csv/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ def uploadCSV(body, request, response):

bots = []
for bot_id, bot_config in CONFIG.get('bots', {}).items() if body.get('validate_with_bots', False) else {}:
log.info('init bot %s', bot_id)
try:
bot = import_module(bot_config['module']).BOT
kwargs = {}
Expand All @@ -272,16 +271,13 @@ def uploadCSV(body, request, response):

bots_input = [event]
for bot_id, bot in bots:
print(f'bot id {bot_id}, input messages: {len(bots_input)}')
bot_raised_errors = False
if bot.bottype is not BotType.OUTPUT:
bots_output = []
# log.info('messages before bot processing: %r', bots_input)
for message in bots_input:
try:
queues = bot.process_message(message)
except Exception:
print(f'message {message} triggered an exception {traceback.format_exc()}')
bot_raised_errors = True
tracebacks.append(traceback.format_exc())
output_lines_invalid += 1
Expand Down Expand Up @@ -331,9 +327,6 @@ def uploadCSV(body, request, response):
elif cb:
conn.commit()

print('output:', bots_output)
print('tracebacks:', tracebacks)

# lineno is the index, for the number of lines add one
total_lines = lineno + 1 if data else 0
result = {"input_lines": total_lines,
Expand Down

0 comments on commit 5a158f1

Please sign in to comment.