Last active
August 23, 2016 15:06
-
-
Save clayadavis/805a23e1876f1474353bccadd07bb890 to your computer and use it in GitHub Desktop.
Test tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from .. import app | |
| from celery.utils.log import get_task_logger | |
| logger = get_task_logger(__name__) | |
| # logger.setLevel(logging.DEBUG) | |
| @app.task(name='test.noop', bind=True) | |
| def noop(self): | |
| logger.info("Completing NOOP task") | |
| return 'ok' | |
| @app.task(name='test.noresult', bind=True, ignore_result=True) | |
| def noresult(self): | |
| logger.info("Completing NORESULT task") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment