Guest User

Untitled

a guest
Nov 30th, 2017
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data