Created
June 26, 2012 15:20
-
-
Save Rafe/2996397 to your computer and use it in GitHub Desktop.
celery-cheat
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
#Quick Cheat Sheet | |
T.delay(arg, kwarg=value) | |
#always a shortcut to .apply_async. | |
T.apply_async((arg, ), {'kwarg': value}) | |
T.apply_async(countdown=10) | |
#executes 10 seconds from now. | |
T.apply_async(eta=now + timedelta(seconds=10)) | |
#executes 10 seconds from now, specifed using eta | |
T.apply_async(countdown=60, expires=120) | |
#executes in one minute from now, but expires after 2 minutes. | |
T.apply_async(expires=now + timedelta(days=2)) | |
#expires in 2 days, set using datetime. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment