log only if new registrations were found, increase sleep to 2 minutes
This commit is contained in:
parent
84f5205a3d
commit
ddf80f9e39
@ -257,7 +257,8 @@ def process_registrations(M):
|
||||
return participations
|
||||
|
||||
msgs = msgs[0].decode('ascii').split()
|
||||
print("\tFound %i registration mails" % len(msgs), file=log_file)
|
||||
if len(msgs) > 0:
|
||||
print("\tFound %i new registration mails" % len(msgs), file=log_file)
|
||||
for msg_index in msgs:
|
||||
participations.append(process_message(M, msg_index))
|
||||
return participations
|
||||
@ -335,4 +336,4 @@ if __name__ == "__main__":
|
||||
with open('etho_registration.log', 'a', buffering=1) as log_file:
|
||||
while True:
|
||||
check_for_mails()
|
||||
time.sleep(60)
|
||||
time.sleep(120)
|
||||
|
Loading…
Reference in New Issue
Block a user