Fixed DelayedTask Class to include new "register" member from trunk

This commit is contained in:
Adolfo Gómez 2013-10-15 07:57:18 +00:00
parent add4c58128
commit 32ffe5e2d7

View File

@ -55,3 +55,14 @@ class DelayedTask(Environmentable):
You must provide your own "run" method to do whatever you need You must provide your own "run" method to do whatever you need
''' '''
logging.debug("Base run of job called for class") logging.debug("Base run of job called for class")
def register(self, suggestedTime, tag='', check=True):
'''
Utility method that allows to register a Delayedtask
'''
from DelayedTaskRunner import DelayedTaskRunner
if check is True and DelayedTaskRunner.runner().checkExists(tag):
return
DelayedTaskRunner.runner().insert(self, suggestedTime, tag)