shutdown services properly
This commit is contained in:
parent
13f27a76ff
commit
a24cb3e04a
@ -60,3 +60,4 @@ if __name__ == "__main__":
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
WebSocketConnection.closeAll()
|
||||
Services.stop()
|
||||
|
@ -369,12 +369,19 @@ class AprsHandler(object):
|
||||
|
||||
|
||||
class Services(object):
|
||||
handlers = []
|
||||
@staticmethod
|
||||
def start():
|
||||
if not PropertyManager.getSharedInstance()["services_enabled"]:
|
||||
return
|
||||
for source in SdrService.getSources().values():
|
||||
ServiceHandler(source)
|
||||
Services.handlers.append(ServiceHandler(source))
|
||||
|
||||
@staticmethod
|
||||
def stop():
|
||||
for handler in Services.handlers:
|
||||
handler.stopServices()
|
||||
Services.handlers = []
|
||||
|
||||
|
||||
class Service(object):
|
||||
|
Loading…
Reference in New Issue
Block a user