Keep disabled Yeastar watchdog idle
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
This commit is contained in:
parent
f6c62d2f78
commit
ef4e4ed3b4
1 changed files with 3 additions and 2 deletions
|
|
@ -133,9 +133,10 @@ def run_watchdog():
|
|||
"""Boucle principale du watchdog."""
|
||||
log_dnd('[DND] Demarrage watchdog')
|
||||
config = load_config()
|
||||
if not config['enabled']:
|
||||
while not config['enabled']:
|
||||
log_dnd('[DND] Watchdog desactive ou configuration Yeastar incomplete')
|
||||
return True
|
||||
time.sleep(300)
|
||||
config = load_config()
|
||||
log_dnd(f"[DND] Config: enabled={config.get('enabled')}, url={config.get('base_url')}, user={config.get('username')}")
|
||||
client = YeastarClient(config['base_url'], config['username'], config['password'])
|
||||
result = client.login()
|
||||
|
|
|
|||
Loading…
Reference in a new issue