Add a check to not create a task to watch a script if the task already exists

This commit is contained in:
Vincent Le Goff 2017-02-13 17:00:02 -08:00 committed by Griatch
parent f6988610cd
commit ec63d43905

View file

@ -170,6 +170,10 @@ class DefaultScript(ScriptBase):
"""
if self.ndb._task and self.ndb._task.running:
# The task already exists, doesn't start it again
return
self.ndb._task = ExtendedLoopingCall(self._step_task)
if self.db._paused_time: