Category : celery

I have a problem that metadata and tasks result are only visible in Flower when tasks are called via Celery’s periodic_task functionality. My code from task_queue.celery import app from tasks.warehouse.warehouse_tasks import synchronize_all_warehouses @app.on_after_finalize.connect def setup_periodic_tasks(sender, **kwargs): sender.add_periodic_task(3600, synchronize_all_warehouses.s(), name="synchronize_all_warehouses") # Start task immediately after deploy so you do not have to wait 1h for results ..

Read more

I am trying to learn how to perform asynchronous tasks using Celery. My app.py file: from flask import Flask, render_template from celery import Celery from flask_mail import Mail, Message from flask_wtf import FlaskForm from wtforms import StringField import os from dotenv import load_dotenv load_dotenv() app = Flask(__name__) app.config[‘SECRET_KEY’] = os.getenv(‘SECRET_KEY’) app.config[‘MAIL_SERVER’] = ‘smtp.googlemail.com’ app.config[‘MAIL_PORT’] = ..

Read more

I want to setup docker-compose for my app, which contains Django, Celery (+Beat), RabbitMQ and PSQL. My problem is that celery beat container does not work as intended (does not schedule a task with interval 10s). Docker logs – celery beat wakes up in 5.00 minutes, celery worker works fine celery-worker_1 | [2021-03-29 21:05:58,201: INFO/MainProcess] ..

Read more

I’m running a celery worker and flower in two separate containers using docker. The host machine’s timezone is set to America/Denver. The celery worker has the following timezone-related configurations: app = Celery(‘app’, broker=RABBITMQ_BROKER_URL) app.conf.enable_utc = False app.conf.timezone = ‘America/Denver’ I’ve tried setting the timezone for the container running flower a couple of different ways, but ..

Read more

I’m trying to get celery to work with Django and docker and the building works well but I celery won’t run. Any ideas? Here is are the docker-compose logs -f errors Starting django-celery_redis_1 … done Starting django-celery_db_1 … done Starting django-celery_flower_1 … done Starting django-celery_celery_beat_1 … done Starting django-celery_celery_worker_1 … done Starting django-celery_web_1 … done ..

Read more