Advertisement
Guest User

Untitled

a guest
Nov 30th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. celery = Celery('task')
  2. celery_app.conf.TRYTON_DATABASE = 'asor'
  3. celery_app.conf.TRYTON_CONF = '/home/andrespoliti/asor-tryton-implementacion/trytond/etc/trytond.conf'
  4.  
  5.  
  6. @celery.task(base=TrytonTask)
  7. def test_task(user_id):
  8. time.sleep(5)
  9. User = Pool().get('res.user')
  10. user = User(user_id)
  11. print 'hello world, %s' % user.name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement