Exemplo n.º 1
0
import chalk
from tiempo.execution import thread_init
from tiempo.task import Task


@Task(priority=1, periodic=True, force_interval=1)
def something():
    chalk.red("something")


thread_init()

from twisted.internet import reactor
reactor.run()
Exemplo n.º 2
0
from tiempo.execution import thread_init
from .utils.loader import auto_load_tasks

thread_init()
auto_load_tasks()
Exemplo n.º 3
0
 def ready(self):
     if not 'runtiempo' in sys.argv:
         print 'initing tasks'
         thread_init(executable_path="%s/manage.py"%os.getcwd(), args=['runtiempo'])
         auto_load_tasks()