celery_worker.py 553 B

12345678910111213141516171819
  1. #!/usr/bin/env python
  2. """
  3. flaskbb.celery_worker
  4. ~~~~~~~~~~~~~~~~~~~~~
  5. Prepares the celery app for the celery worker.
  6. To start celery, enter this in the console::
  7. celery -A celery_worker.celery --loglevel=info worker
  8. :copyright: (c) 2016 by the FlaskBB Team.
  9. :license: BSD, see LICENSE for more details.
  10. """
  11. import os
  12. from flaskbb.app import create_app
  13. from flaskbb.extensions import celery # noqa
  14. _basepath = os.path.dirname(os.path.abspath(__file__))
  15. app = create_app(config=os.path.join(_basepath, 'flaskbb.cfg'))