Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
feat: deactivated sync scheduler if migration variables set to True (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kevforget authored Feb 6, 2023
1 parent 1771347 commit 7735857
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sync_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@
import json
import logging

import os

logger = logging.getLogger('Sync Scheduler')
logger = _GLOBAL_LOGGER

if os.getenv("HUB_IS_IN_MAINTENANCE", "False").lower() in ("true", "1") or os.getenv("USER_CONNECTED_SESSION_BLOCKED_AND_LOGIN_BUTTON_REDIRECTED_TO_MY_ACCOUNT", "False").lower() in ("true", "1"):
while True:
logger.info("The HUB is in maintainance or deactivated, doing nothing")
time.sleep(60)


logger.info("-----[ INITIALIZE SYNC_SCHEDULER ]-----")
sqsManager = SqsManager()
sqsManager.get_queue()
Expand Down

0 comments on commit 7735857

Please sign in to comment.