SHARE
TWEET
azerty1664
a guest
Jun 5th, 2018
147
Never
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:rabbitmq@127.0.0.1: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()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
