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

@@ -7,6 +7,7 @@ import os
import dotenv
import sys
import json
from apscheduler.schedulers.background import BackgroundScheduler
class GunicornApp(BaseApplication):
@@ -24,6 +25,10 @@ class GunicornApp(BaseApplication):
return self.application
if __name__ == '__main__':
scheduler = BackgroundScheduler()
scheduler.add_job(func=server.check_payments, trigger="interval", seconds=10)
scheduler.start()
workers = os.getenv('WORKERS')
threads = os.getenv('THREADS')
if workers is None: