Created
October 23, 2021 02:12
-
-
Save lucaspolo/6300cd862fd367eb92e242981a70d6a2 to your computer and use it in GitHub Desktop.
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
import os | |
import time | |
from celery import Celery | |
app = Celery('tasks', broker=os.getenv('BROKER_URL', 'redis://localhost/0')) | |
@app.task | |
def envia_email(): | |
... | |
app.conf.beat_schedule = { | |
'envia-emails-a-cada-30-segundas': { | |
'task': 'tasks.envia_email', | |
'schedule': 10.0, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment