"Configure - init - run - destroy" server lifecycle pattern, python-way as:
with PagingServer(config, sd_cycle) as server:
for sig in signal.SIGINT, signal.SIGTERM:
signal.signal(sig, lambda sig,frm: server.destroy())
server.run()
With proper container for all server-y stuff instead of globals.
Also properly integrates systemd watchdog calls into run() loop via lib.handle_events(), no more while True: sleep() nonsense, pjsua can run in the main thread just fine.
Based on systemd and cli/logging stuff from #8 and #9.
"Configure - init - run - destroy" server lifecycle pattern, python-way as:
With proper container for all server-y stuff instead of globals.
Also properly integrates systemd watchdog calls into run() loop via lib.handle_events(), no more
while True: sleep()
nonsense, pjsua can run in the main thread just fine.Based on systemd and cli/logging stuff from #8 and #9.