Renamed fire() method to force_repeat().

This commit is contained in:
Griatch 2014-02-14 01:52:14 +01:00
parent cf4a6f90a5
commit f35fd236b7

View file

@ -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):