1,746 questions
5
votes
0
answers
1k
views
How to ignore error in celery chord and allows the process to continue
I have a celery workflow with multiple tasks, chain and chords.
Some of theses tasks need to be executed sequentially, some others can be executed in parallel.
The problem is when an error is raised ...
1
vote
0
answers
122
views
Task not executed in Django's Celery
Since I am not an English speaker, I use translation tools to write my text.
Task not executed
Here are the execution environment and messages
Local PC
OS windows 10
Python 3.8
DB Server
CentOS 7.3
...
0
votes
1
answer
594
views
upload huge file and receive that with django framework for example
I want to send huge file from http request and receive that in django application,
how can I do this?
please describe to me the scenario.
Do I must split the file or there is some other way to solve ...
0
votes
0
answers
423
views
Sending emails in Celery tasks not executing
I have a view function in Django, which receives a post request with the data of sending letters (the poster post, the topic of the letter, message, etc.) from the user and transmits them to Celery ...
0
votes
1
answer
128
views
Multiple python commands does not run from bash
I have a bash script that launches wsgi for python and celery as well. The pythib project launes nicely though celery does not work. Below i incluse two ways of invoking the wsgi project and celery ...
0
votes
1
answer
140
views
Django+ DRF + Celery: Schedule the same task for different objects in database in different time for each object
I am working on an HR application, where a company has a branch and each branch has its working days policy in which the branch decides the hours of start and end of work day and the hour when the day ...
0
votes
2
answers
346
views
Django Celery. How to make tasks execute at the appropriate different times given in variables
I try to make a task that will be done at a certain time. Example:
A customer borrowed a book on 01/01/2023 15:00 so the tasks will do exactly one week from now if he doesn't return it and charge a ...
1
vote
1
answer
846
views
how to get task status in celery
I have a celery task and I want the status of the task using task ID. I have read the previous answers but couldn't make it work. I used the command
celery -A proj inspect query_task e9f6c8f0-fec9-...
0
votes
1
answer
115
views
How create task with celery in django? POO issue?
I'm trying to set up a task with Django and Celery. The Celery and Django configuration is okay, nothing to report on that side. However, I have a problem, I think with the writing, of my code in OOP. ...
0
votes
3
answers
1k
views
RuntimeError: Model class django_celery_beat.models.SolarSchedule doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS
I'm using my virtualenv and upon executing celery -A app beat -l info -S django, this error always displays.
RuntimeError: Model class django_celery_beat.models.SolarSchedule doesn't declare an ...
2
votes
1
answer
1k
views
Django with Celery on Digital Ocean
The Objective
I am trying to use Celery in combination with Django; The objective is to set up Celery on a Django web application (deployed test environment) to send scheduled emails. The web ...
1
vote
2
answers
908
views
No module named 'project_name' with Django + Celery?
Day 2 of debugging this I have to turn to stackoverflow I'm on the edge.
I used cookiecutter-django to generate my project months ago.
Project name
config/settings/...
src/
app_name/
...
2
votes
1
answer
283
views
How to prevent storage of celery chord counter objects in database
I am experiencing an issue where the django_celery_results_chordcounter table is filling up fast making me run out of server space. It was growing from a few MBs to over 99GB.
I have tried resolving ...
0
votes
2
answers
3k
views
Overriding the Celery Task Class to be able share variables between tasks
Am trying to implement a task where the global variables are shared between two different Celery tasks. For that, I have inherited task class and used property. As per celery documentation the base ...
1
vote
1
answer
338
views
DJANGO_CELERY_BEAT access PeriodicTask from shared_task
In my project, I use django celery beat package to execute scheduled tasks. It works well but I have one case that I can't handle.
All the tasks have a PeriodicTack that schedules them.
So the ...
0
votes
2
answers
89
views
ImportError: cannot import name 'Users' from partially initialized module tasks file
ImportError: cannot import name 'Users' from partially initialized module 'users.models
from .models import Users
from celery import shared_task
from django.core.mail import send_mail
from server ...
0
votes
0
answers
503
views
Why Django celery throws me a key error, not sure why?
Not sure why it throws this key error.
My project/celery.py:
import os
from celery import Celery
# Set the default Django settings module for the 'celery' program.
os.environ.setdefault('...
0
votes
1
answer
920
views
How can a celery task accept a list of files as an argument?
Actually, I don't know how I could make the task have a list of files as an argument.
files = {}
for file in request.FILES.getlist('files'):
files[file.name] = file.file.read()
...
1
vote
2
answers
337
views
Patch Django EmailMultiAlternatives send() in a Celery Task so that an exception is raised
I want to test a Celery Task by raising an SMTPException when sending an email.
With the following code, located in:
my_app.mailer.tasks
from django.core.mail import EmailMultiAlternatives
@app.task(...
1
vote
0
answers
106
views
Celery setup for multiple Django Projects running in Docker Swarm
We have multiple Django Projects (in dedicated GitHub repos) running in Docker Swarm. We want to set up Celery in such a way that it can be used across all the projects.
Is there a way to achieve this?...
1
vote
1
answer
190
views
Django + Celery task never done
I'm trying to run the example app Django+Celery from official celery repository:
https://github.com/celery/celery/tree/master/examples/django
I cloned the repo, ran RabbitMQ in my docker container:
...
0
votes
0
answers
1k
views
How to ensure tasks in one celery queue get executed in order
I am working on set up some celery queues for process some tasks. Each task hashes a value and send this task to a delicate queue based on hashed value. What I want to achieve is, to make sure ...
1
vote
1
answer
844
views
How to specify celery beat periodic task?
I want to make a periodic task with Django and Celery. I have configured the celery in my project.
The project structure looks like this:
project
├── apps
│ ├── laws
│ └──tasks
│ └──...
0
votes
1
answer
43
views
IntegrityError at /api/mail-task/ NOT NULL constraint failed: django_celery_beat_periodictask.task
Getting the above error while connecting a celery task with view
@shared_task
def send_mail_func(mail_task_id):
mail_task = MailTask.objects.get(id=mail_task_id)
subject = mail_task.subject
...
0
votes
0
answers
2k
views
Redis giving the error: TypeError: Connection.__init__() got an unexpected keyword argument 'username'
I am integrating the celery in our project. Redis giving the error when, I am trying to run this command
python -m celery -A claims_dashboard worker
# Celery settings.py
CELERY_BROKER_URL = "...
0
votes
1
answer
335
views
Angular doesn't create an object out of JSON response
I'm trying to create an object out of my json (from a http request) but it's a plain string.
Interfaces:
export interface CeleryTask {
uuid: string,
state: string,
received: string,
result: ...
0
votes
1
answer
192
views
Angular map flower (celery+django) return to list of tasks
I want to map the return of the flower libary (/api/tasks) to a list of objects. Currently it returns multiple objects, but without the "list wrapper", so it's not possible to iterate that.
...
1
vote
1
answer
2k
views
How to see celery tasks in redis queue when there is no worker?
I have a container creating celery tasks, and a container running a worker.
I have removed the worker container, so I expected that tasks would accumulate in the redis list of tasks.
But I can't see ...
0
votes
1
answer
275
views
Angular CLI (Typescript) - multiple http calls with polling (timer)
I have a django backend and I'm trying to poll the status of multiple Celery Tasks (https://docs.celeryq.dev/en/stable/index.html) every 3 seconds.
So for example I have 4 task ids:
3099023
3493494
...
1
vote
1
answer
1k
views
Django large CSV export with celery (async)
I am trying to export a CSV file which takes a while to generate. I have written the export CSV view which is successfully working, however I needed to adapt it to use celery for it to work in ...
2
votes
0
answers
338
views
Why can pylance not resolve these imports? (python does)
This is in a virtual env, it is configured in vscode and tests run inside of VSCode Testing panel, and in a python shell and the import can most definitely be found by everything except pylance.
from ...
3
votes
0
answers
839
views
Celery group nested within chain does not call chain's link_error task on failure
I have the following workflow triggered from within a separate task on Celery 5.1.2:
work_flow = chain([
task_1.si(args),
data_group,
task_2.si(args),
task_3.si(...
2
votes
0
answers
30
views
Celery execution time
I already have an email_sender function using Celery; each email takes 3 seconds to send, and i want to improve my function.
so i need Celery to do something like this:
send email_num[1:500] ---> ...
0
votes
0
answers
313
views
Django==3.2.15 celery v5.1.2 and jango-celery-beat==2.2.1 enable task and nothing heppens
Ok all day trying to figure out what is wrong.
mysite.settings
"""
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 2.1.
For more information ...
0
votes
1
answer
804
views
python sleep for second to throttle requests
I have a celery periodic task which has a function call inside it i need to make the code sleep for a second for every 20 emails sent how can i achieve that.
@app.task(bind=True)
def ...
0
votes
2
answers
435
views
Django AttributeError: 'list' object has no attribute 'sort_values'
I'm getting AttributeError: 'list' object has no attribute 'sort_values' in below code,
task.py:
from __future__ import absolute_import,unicode_literals
from celery import shared_task
from time import ...
2
votes
0
answers
302
views
Celery KeyError: 'myproject.tasks.async_task'
When i'm trying to run celery background task then it giving me error: KeyError: 'myproject.tasks.async_task'
I'm using python version: 3.8.10, django verion: 4.1.2 , celery version: 5.2.7 and ...
2
votes
0
answers
816
views
does celery docker container have to copy the same files from django container build?
Here is tha raw question:
i was wondering if i can run the command from celery container using another container data like django container as these containers are in the same network of containers on ...
1
vote
1
answer
2k
views
Celery current_task.update_state not working
I'm trying to add a long running async task and make it update it's progress status in intervals. I'm using a Django-rest-framework server, RabbitMQ broker, Celery worker. I'm able to add a task to ...
0
votes
1
answer
626
views
Issue with connecting to PostgreSQL on localhost in Django application [duplicate]
I am using Docker to run my Django app and I have multiple images in it: PostgreSQL, celery_worker, celery_beat, and django_app. All of them except celery_beat are working fine. I am using this ...
-2
votes
1
answer
447
views
How do you test a celery chord in a django app from inside of pytest?
Using:
celery==5.2.7
django-celery-results==2.4.0
django==4.1
pytest==7.1.2
pytest-django==4.5.2
pytest-celery==0.0.0
I'm trying to test a task (start_task) that creates a chord (of N work_task ...
0
votes
1
answer
684
views
Problem when updating a table using celery task: OperationalError
EDIT 2022-10-04 18:40
I've tried using bulk_update and bulk_create as these method only query database once but still have the same issue
would appreciate any help/explanation on this issue
'''
...
1
vote
1
answer
308
views
Celery has DNS resolution problems?
I used Celery for email registration asynchronously, but when I trigger this asynchronous request, the following error will appear
Traceback (most recent call last):
File "d:\python3\lib\site-...
0
votes
0
answers
720
views
Is celery-beats can only trigger a celery task or normal task (Django)?
I am workign on a django project with celery and celery-beats. My main use case is use celery-beats to set up a periodical task as a background task, instead of using a front-end request to trigger. I ...
0
votes
1
answer
603
views
Celery crontab to schedule 1 of the month and quarterly in year
I have a celery task which executes quarterly on 1 of the month how can my month_of_year can be written
{
'task': 'mytask',
'schedule': crontab(day_of_month='1', month_of_year='')
},
1
vote
0
answers
344
views
celery start worker automatically on boot with secure redis
I am trying to start celery worker and celery beat on startup. celery worker to start with.
using ubuntu 20.04, redis, celery, python 3.8.10, django 4.0.7, virtual env
Followed the link to install ...
0
votes
0
answers
161
views
Received unregistered task of type 'dividends_project.run_yahoo_request_for_stock_info_task'
I have worked through someone else's solution to this and nothing has helped. I am getting error
The delivery info for this task is:
{'exchange': '', 'routing_key': 'celery'}
Traceback (most recent ...
-1
votes
2
answers
293
views
how to run class task in celery?
i have an class like :
from web3 import Web3, HTTPProvider
class Eth:
@staticmethod
def get_balance(self,address):
self.conn = Web3(HTTPProvider("**************"))
...
2
votes
0
answers
289
views
django-celery-beat PeriodicTask not firing
I have a project using django-celery-beat, celery, and reds. For some reason one specific task out of many in my entire project never fires, with no errors or anything.
I've verified that it's ...
1
vote
1
answer
295
views
Django/Celery - Filter each task result with periodic_task_name
I am quite new to Celery. Here is my code for configuring Celery Beat.
app.conf.beat_schedule = {
# EMAILS
'send-feedback-mail-every-2-weeks': {
'task': 'stocks.tasks.send_ask_feedback'...