Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- celery -A tasks worker -B --loglevel=debug -Q queue_lively -n hostname
- cat ./tasks.py
- app = Celery('tasks', broker='amqp://rabbitmq:[email protected]:5672', backend='rpc://')
- app.conf.update(
- task_routes = {
- 'tasks.lively_jobs': 'queue_lively',
- },
- timezone='Europe/Paris',
- )
- @periodic_task(run_every=crontab(minute='*/1'))
- def lively_jobs():
- print "hello world"
- return True
- def setup_lively_jobs():
- lively_jobs.s()
- setup_lively_jobs()
Advertisement
Add Comment
Please, Sign In to add comment