celery

How to make specific background task in Django?

How to make specific background task in Django? Question: I have a mission to make a background task in Django, I tried with celery but I didn’t have success. What I have to do? I need after the person wrote the number in input and pressed submit button, for example 100, the 1% of it …

Total answers: 1

How can I use Celery in Django with just the DB?

How can I use Celery in Django with just the DB? Question: Looking at https://docs.celeryq.dev/en/v5.2.7/getting-started/backends-and-brokers/index.html it sounds pretty much as if it’s not possible / desirable. There is a section about SQLAlchemy, but Django does not use SQLAlchemy. In way older docs, there is https://docs.celeryq.dev/en/3.1/getting-started/brokers/django.html . Is it possible with recent Celery / Django versions …

Total answers: 2

Celery scheduler not performing the task

Celery scheduler not performing the task Question: I was trying to use Celery to query an external api at a regular frequency and update my database in my Django project with the new data. Celery schedules the task correctly and sends it to the celery worker but it never executes anything. Here is my celery.py …

Total answers: 1

Celery in python to build microservices

Celery in python to build microservices Question: I want to break down a project to small microservices. I’ve been thinking of different tools like gRPC, but I think celery might be a better option for me. Please if I’m wrong and celery is not a good choice, tell me why. What exactly I want to …

Total answers: 3

django celery error: Unrecoverable error: AttributeError("'EntryPoint' object has no attribute 'module_name'")

django celery error: Unrecoverable error: AttributeError("'EntryPoint' object has no attribute 'module_name'") Question: I am perplexed,from a weird error which i have no idea as i am new to celery, this error occurs on just the setup phase, every thing is simply configured as written in the celery doc https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html the tracback is: (env) muhammad@huzaifa:~/Desktop/practice/app$ celery …

Total answers: 4

After Changing Python Version 3.6 to 3.10 I got cannot import name 'Callable' from 'collections'

After Changing Python Version 3.6 to 3.10 I got cannot import name 'Callable' from 'collections' Question: File "C:UsersCodertjayPycharmProjectsTeems_App_Kidteems_app_kid__init__.py", line 5, in <module> from .celery import app as celery_app File "C:UsersCodertjayPycharmProjectsTeems_App_Kidteems_app_kidcelery.py", line 3, in <module> from celery import Celery File "C:UsersCodertjayPycharmProjectsbrownieTeems_App_Kidlibsite-packagesceleryfive.py", line 306, in __getattr__ module = __import__(self._object_origins[name], None, None, [name]) File "C:UsersCodertjayPycharmProjectsbrownieTeems_App_Kidlibsite-packagesceleryapp__init__.py", line 14, in …

Total answers: 3

How to use Celery to upload files in Django

How to use Celery to upload files in Django Question: I was wondering how I can use Celery workers to handle file uploads. So I tried implementing it on a simple class. I overrided the create class in my ModelViewSet. But apparently Django’s default json encoder does not serialize ImageFields (Lame). I’ll really appreciate it …

Total answers: 2

Module 'project_name' has no attribute 'celery'

Module 'project_name' has no attribute 'celery' Question: I’m trying to set up a background task using celery and rabbitmq on django but I’m getting an error saying that my project has no attribute celery. I’m using PyCharm and installed celery through that. I’m new to celery but I’ve read a lot of articles similar to …

Total answers: 2

how do you configure `celery` to use serializer 'pickle'?

how do you configure `celery` to use serializer 'pickle'? Question: on the tasks.py side i do: app = Celery( main=’tasks’, backend=’rpc://’, broker=’pyamqp://USERNAME:PASSWORD@localhost’, ) app.conf.task_serializer = ‘pickle’ app.conf.result_serializer = ‘pickle’ app.conf.event_serializer = ‘pickle’ app.conf.accept_content = [‘pickle’] app.conf.task_accept_content = [‘pickle’] app.conf.result_accept_content = [‘pickle’] app.conf.event_accept_content = [‘pickle’] when i start two workers manually i via: celery –app tasks …

Total answers: 1