operator.py 405 B

123456789101112131415161718
  1. # -*- coding: utf-8 -*-
  2. # !/usr/bin/env python
  3. from patch_celery import patch_requests
  4. patch_requests()
  5. from celery import Celery
  6. app = Celery('manyi_taskmanager', include = ['taskmanager.tasks'])
  7. import os
  8. app.config_from_object(os.getenv('CELERY_CONFIG', 'taskmanager.config'))
  9. if __name__ == '__main__':
  10. from patch import patch_requests
  11. patch_requests()
  12. app.start()