callmanager constructor

This commit is contained in:
2024-03-12 23:30:26 +01:00
parent 2c5773426a
commit 6bd5838c24
2 changed files with 11 additions and 11 deletions

View File

@@ -10,7 +10,11 @@ from call_manager import CallManager, NO_CALL, INCOMING_CALL, OUTGOING_CALL, OP_
CHECK_STATUS_INTERVAL = 120
callManager = CallManager()
config = yaml.safe_load(open("intercom.yml"))
port = config['port']
stations = config['stations']
callManager = CallManager(config)
def getstationbyip(ip):
@@ -70,10 +74,6 @@ def check_status(station):
time.sleep(CHECK_STATUS_INTERVAL)
config = yaml.safe_load(open("intercom.yml"))
port = config['port']
stations = config['stations']
# Start thread to wait for incoming hang petitions.
thread_listen = Thread(target=listen, args=(callManager,))
thread_listen.daemon = True