no need for shared instances here
This commit is contained in:
parent
5b6edd110d
commit
b0b2df5422
@ -7,7 +7,7 @@ from owrx.feature import FeatureDetector
|
|||||||
from owrx.source import SdrService, ClientRegistry
|
from owrx.source import SdrService, ClientRegistry
|
||||||
from socketserver import ThreadingMixIn
|
from socketserver import ThreadingMixIn
|
||||||
from owrx.sdrhu import SdrHuUpdater
|
from owrx.sdrhu import SdrHuUpdater
|
||||||
from owrx.service import ServiceManager
|
from owrx.service import Services
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ Author contact info: Andras Retzler, HA7ILM <randras@sdr.hu>
|
|||||||
updater = SdrHuUpdater()
|
updater = SdrHuUpdater()
|
||||||
updater.start()
|
updater.start()
|
||||||
|
|
||||||
ServiceManager.getSharedInstance().start()
|
Services.start()
|
||||||
|
|
||||||
server = ThreadedHttpServer(("0.0.0.0", pm.getPropertyValue("web_port")), RequestHandler)
|
server = ThreadedHttpServer(("0.0.0.0", pm.getPropertyValue("web_port")), RequestHandler)
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
@ -205,16 +205,9 @@ class AprsHandler(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ServiceManager(object):
|
class Services(object):
|
||||||
sharedInstance = None
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getSharedInstance():
|
def start():
|
||||||
if ServiceManager.sharedInstance is None:
|
|
||||||
ServiceManager.sharedInstance = ServiceManager()
|
|
||||||
return ServiceManager.sharedInstance
|
|
||||||
|
|
||||||
def start(self):
|
|
||||||
if not PropertyManager.getSharedInstance()["services_enabled"]:
|
if not PropertyManager.getSharedInstance()["services_enabled"]:
|
||||||
return
|
return
|
||||||
for source in SdrService.getSources().values():
|
for source in SdrService.getSources().values():
|
||||||
|
Loading…
Reference in New Issue
Block a user