Add --secondary arg

This commit is contained in:
Piero Toffanin 2024-07-19 14:14:25 -04:00
commit 2f8ede54d7
4 changed files with 14 additions and 2 deletions

View file

@ -13,10 +13,10 @@ def setup(args):
if scheduler is None:
scheduler = BackgroundScheduler()
if args.req_flood_threshold > 0:
if not args.secondary and args.req_flood_threshold > 0:
scheduler.add_job(func=forgive_banned, trigger="interval", minutes=10)
if args.api_keys and args.require_api_key_secret:
if not args.secondary and args.api_keys and args.require_api_key_secret:
scheduler.add_job(func=rotate_secrets, trigger="interval", minutes=30)
scheduler.start()