write messages to log file
This commit is contained in:
parent
c05b3d4e7f
commit
532c1da85d
@ -312,7 +312,7 @@ def check_for_mails():
|
||||
|
||||
new_participations = process_registrations(M)
|
||||
for p in new_participations:
|
||||
print("New registration by %s" % p.name, file=sys.stderr)
|
||||
print("New registration by %s" % p.name, file=log_file)
|
||||
csv_file = p.save_to_csv()
|
||||
send_confirmation(p, csv_file)
|
||||
M.close()
|
||||
@ -320,8 +320,9 @@ def check_for_mails():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
while True:
|
||||
print("%s: Checking for new registrations mails!" % dt.datetime.now().isoformat(),
|
||||
file=sys.stderr)
|
||||
check_for_mails()
|
||||
time.sleep(60)
|
||||
with open('etho_registration.log', 'a') 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