celery.py 335 B

12345678910111213141516
  1. from __future__ import absolute_import
  2. from celery import Celery
  3. app = Celery('proj',
  4. broker='amqp://',
  5. backend='amqp://',
  6. include=['proj.tasks'])
  7. # Optional configuration, see the application user guide.
  8. app.conf.update(
  9. result_expires=3600,
  10. )
  11. if __name__ == '__main__':
  12. app.start()