Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- celery = Celery('task')
- celery_app.conf.TRYTON_DATABASE = 'asor'
- celery_app.conf.TRYTON_CONF = '/home/andrespoliti/asor-tryton-implementacion/trytond/etc/trytond.conf'
- @celery.task(base=TrytonTask)
- def test_task(user_id):
- time.sleep(5)
- User = Pool().get('res.user')
- user = User(user_id)
- print 'hello world, %s' % user.name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement