Created
March 13, 2020 20:58
-
-
Save sweldon/9c3003496f4e0f0c0b5970950b17681c to your computer and use it in GitHub Desktop.
Celery Periodic Task in Django Example
This file contains 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 celery.decorators import periodic_task | |
from datetime import timedelta | |
@periodic_task(run_every=(timedelta(seconds=10)), name="my_task", ignore_result=True) | |
def my_task(): | |
return "success" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment