Renamed fire() method to force_repeat().
This commit is contained in:
parent
cf4a6f90a5
commit
f35fd236b7
1 changed files with 4 additions and 4 deletions
|
|
@ -90,7 +90,7 @@ class ExtendedLoopingCall(LoopingCall):
|
||||||
# won't have time to be called in some situations. Kill
|
# won't have time to be called in some situations. Kill
|
||||||
# externally by checking task.repeats <= 0.
|
# externally by checking task.repeats <= 0.
|
||||||
|
|
||||||
def fire(self):
|
def force_repeat(self):
|
||||||
"Force-fire the callback"
|
"Force-fire the callback"
|
||||||
assert self.running, ("Tried to fire an ExtendedLoopingCall "
|
assert self.running, ("Tried to fire an ExtendedLoopingCall "
|
||||||
"that was not running.")
|
"that was not running.")
|
||||||
|
|
@ -310,15 +310,15 @@ class ScriptBase(TypeClass):
|
||||||
self._start_task()
|
self._start_task()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def fire(self):
|
def force_repeat(self):
|
||||||
"""
|
"""
|
||||||
Fire a premature triggering of the script callback. This
|
Fire a premature triggering of the script callback. This
|
||||||
will reset timer and count down repeats as if the script
|
will reset the timer and count down repeats as if the script
|
||||||
had fired normally.
|
had fired normally.
|
||||||
"""
|
"""
|
||||||
task = self.ndb._task
|
task = self.ndb._task
|
||||||
if task:
|
if task:
|
||||||
task.fire()
|
task.force_repeat()
|
||||||
|
|
||||||
# hooks
|
# hooks
|
||||||
def at_script_creation(self):
|
def at_script_creation(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue