allow services to be disabled on individual sdrs
This commit is contained in:
parent
e60c332c24
commit
036442aa69
@ -120,6 +120,8 @@ class ServiceScheduler(object):
|
|||||||
self.source.removeClient(self)
|
self.source.removeClient(self)
|
||||||
|
|
||||||
def scheduleSelection(self, time=None):
|
def scheduleSelection(self, time=None):
|
||||||
|
if self.source.getState() == SdrSource.STATE_FAILED:
|
||||||
|
return
|
||||||
seconds = 10
|
seconds = 10
|
||||||
if time is not None:
|
if time is not None:
|
||||||
delta = time - datetime.utcnow()
|
delta = time - datetime.utcnow()
|
||||||
@ -199,6 +201,8 @@ class ServiceHandler(object):
|
|||||||
elif state == SdrSource.STATE_FAILED:
|
elif state == SdrSource.STATE_FAILED:
|
||||||
logger.debug("sdr source failed; stopping services.")
|
logger.debug("sdr source failed; stopping services.")
|
||||||
self.stopServices()
|
self.stopServices()
|
||||||
|
if self.scheduler:
|
||||||
|
self.scheduler.shutdown()
|
||||||
|
|
||||||
def onBusyStateChange(self, state):
|
def onBusyStateChange(self, state):
|
||||||
pass
|
pass
|
||||||
@ -385,6 +389,8 @@ class Services(object):
|
|||||||
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():
|
||||||
|
props = source.getProps()
|
||||||
|
if "services" not in props or props["services"] != False:
|
||||||
Services.handlers.append(ServiceHandler(source))
|
Services.handlers.append(ServiceHandler(source))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user