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)
|
||||
|
||||
def scheduleSelection(self, time=None):
|
||||
if self.source.getState() == SdrSource.STATE_FAILED:
|
||||
return
|
||||
seconds = 10
|
||||
if time is not None:
|
||||
delta = time - datetime.utcnow()
|
||||
@ -199,6 +201,8 @@ class ServiceHandler(object):
|
||||
elif state == SdrSource.STATE_FAILED:
|
||||
logger.debug("sdr source failed; stopping services.")
|
||||
self.stopServices()
|
||||
if self.scheduler:
|
||||
self.scheduler.shutdown()
|
||||
|
||||
def onBusyStateChange(self, state):
|
||||
pass
|
||||
@ -385,6 +389,8 @@ class Services(object):
|
||||
if not PropertyManager.getSharedInstance()["services_enabled"]:
|
||||
return
|
||||
for source in SdrService.getSources().values():
|
||||
props = source.getProps()
|
||||
if "services" not in props or props["services"] != False:
|
||||
Services.handlers.append(ServiceHandler(source))
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user