Answer the question
In order to leave comments, you need to log in
How to view task results in celery?
Need help understanding how celery works, especially how to monitor execution of
Celery 4.0 + redis
1 tasks.
from celery import shared_task
from celery.decorators import task
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
@shared_task
def add(x, y):
logger.info('adding')
return x + y
add.delay(2,2)
add(2,2)
@periodic_task(
run_every=(crontab(minute='*/1')),
ignore_result=True
)
def period():
req = requests.get('http://example')
req = message_delayed()
send(req)
logger.info('task success')
@csrf_exempt
@task
def user_get(request):
if request.method == 'POST':
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question