fix scheduler behavior on enable / disable
This commit is contained in:
parent
d573561c67
commit
9dcf342b13
@ -231,7 +231,7 @@ class ServiceScheduler(SdrSourceEventClient):
|
|||||||
self.source.removeClient(self)
|
self.source.removeClient(self)
|
||||||
|
|
||||||
def scheduleSelection(self, time=None):
|
def scheduleSelection(self, time=None):
|
||||||
if self.source.isFailed():
|
if not self.source.isEnabled() or self.source.isFailed():
|
||||||
return
|
return
|
||||||
seconds = 10
|
seconds = 10
|
||||||
if time is not None:
|
if time is not None:
|
||||||
@ -259,7 +259,7 @@ class ServiceScheduler(SdrSourceEventClient):
|
|||||||
self.shutdown()
|
self.shutdown()
|
||||||
|
|
||||||
def onDisable(self):
|
def onDisable(self):
|
||||||
self.shutdown()
|
self.cancelTimer()
|
||||||
|
|
||||||
def onEnable(self):
|
def onEnable(self):
|
||||||
self.scheduleSelection()
|
self.scheduleSelection()
|
||||||
|
Loading…
Reference in New Issue
Block a user