set log file buffering to line
This commit is contained in:
parent
643f72e010
commit
7a2ac78218
@ -324,7 +324,7 @@ def check_for_mails():
|
||||
|
||||
new_participations = process_registrations(M)
|
||||
for p in new_participations:
|
||||
print("\tNew registration by %s" % p.name, file=log_file)
|
||||
print("%s\tNew registration by %s" % (dt.datetime.now().isoformat(), p.name), file=log_file)
|
||||
csv_file = p.save_to_csv()
|
||||
send_confirmation(p, csv_file)
|
||||
M.close()
|
||||
@ -332,9 +332,7 @@ def check_for_mails():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with open('etho_registration.log', 'a') as log_file:
|
||||
with open('etho_registration.log', 'a', buffering=1) as log_file:
|
||||
while True:
|
||||
print("%s: Checking for new registrations mails!" % dt.datetime.now().isoformat(),
|
||||
file=log_file)
|
||||
check_for_mails()
|
||||
time.sleep(60)
|
||||
|
Loading…
Reference in New Issue
Block a user