feat: Update check for payments timer
All checks were successful
Build Docker / Build Image (push) Successful in 22s

This commit is contained in:
2024-02-12 17:57:46 +11:00
parent 4a577349f5
commit 4e8052eecb
2 changed files with 11 additions and 3 deletions

View File

@@ -293,13 +293,16 @@ def not_found(e):
return render_template('404.html'), 404
def repeat_check_payments():
def repeat_check_payments(auto=False):
# Run check_payments function
payments.check_payments()
# Schedule the function to run again after 10 seconds
threading.Timer(10, repeat_check_payments).start()
if not auto:
threading.Timer(10, repeat_check_payments).start()
def check_payments():
print('Checking payments', flush=True)
payments.check_payments()
if __name__ == '__main__':
# Set timer for payments