mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Update the way the scheduler set his healthy state
This commit is contained in:
parent
b82642faf7
commit
7e3683ef46
1 changed files with 5 additions and 1 deletions
|
|
@ -30,6 +30,7 @@ from logger import setup_logger # type: ignore
|
|||
from Database import Database # type: ignore
|
||||
from JobScheduler import JobScheduler
|
||||
|
||||
HEALTHY = False
|
||||
RUN = True
|
||||
SCHEDULER: Optional[JobScheduler] = None
|
||||
INTEGRATION = "Linux"
|
||||
|
|
@ -518,7 +519,6 @@ if __name__ == "__main__":
|
|||
|
||||
# infinite schedule for the jobs
|
||||
logger.info("Executing job scheduler ...")
|
||||
Path(sep, "var", "tmp", "bunkerweb", "scheduler.healthy").write_text("ok", encoding="utf-8")
|
||||
while RUN and not NEED_RELOAD:
|
||||
SCHEDULER.run_pending()
|
||||
sleep(1)
|
||||
|
|
@ -587,6 +587,10 @@ if __name__ == "__main__":
|
|||
CONFIG_NEED_GENERATION = True
|
||||
NEED_RELOAD = True
|
||||
|
||||
if not NEED_RELOAD and not HEALTHY:
|
||||
Path(sep, "var", "tmp", "bunkerweb", "scheduler.healthy").write_text("ok", encoding="utf-8")
|
||||
HEALTHY = True
|
||||
|
||||
FIRST_RUN = False
|
||||
|
||||
if NEED_RELOAD:
|
||||
|
|
|
|||
Loading…
Reference in a new issue