Working
This commit is contained in:
parent
6586ac2bfe
commit
e06c43b762
@ -74,7 +74,6 @@ def update_crontab(p_my_handler):
|
||||
user_ids = []
|
||||
user_crontab = []
|
||||
|
||||
if all_users != None:
|
||||
for element in all_users:
|
||||
if element["cron"] != '' and element["telegram_user_id"] != '': # check if both values are existing so I have consistent data
|
||||
try:
|
||||
@ -84,9 +83,7 @@ def update_crontab(p_my_handler):
|
||||
except:
|
||||
user_ids.pop() # if something goes wrong with cron I have to delete matching user id
|
||||
except: continue
|
||||
else:
|
||||
print("Error with all users from db. Retrying in update_crontab()")
|
||||
update_crontab(p_my_handler)
|
||||
|
||||
|
||||
|
||||
print(user_ids)
|
||||
|
Loading…
Reference in New Issue
Block a user