Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can celery celerybeat use a Database Scheduler without Django?

I have a small infrastructure plan that does not include Django. But, because of my experience with Django, I really like Celery. All I really need is Redis + Celery to make my project. Instead of using the local filesystem, I'd like to keep everything in Redis. My current architecture uses Redis for everything until it is ready to dump the results to AWS S3. Admittedly I don't have a great reason for using Redis instead of the filesystem. I've just invested so much into architecting this with Docker and scalability in mind, it feels wrong not to.

like image 452
Bruno Bronosky Avatar asked Feb 27 '15 08:02

Bruno Bronosky


People also ask

How do you run a celery scheduler?

To begin, let's first set up the Flask framework with Celery. Save this python script as app.py in the main project directory, and in your terminal, run: python ~/celery-scheduler/app.py . Now go to http://localhost:5000/. If everything is running fine, you should see “Hello, Flask is up and running!”

What is celery Celerybeat?

Introduction. celery beat is a scheduler. It kicks off tasks at regular intervals, which are then executed by the worker nodes available in the cluster. By default the entries are taken from the CELERYBEAT_SCHEDULE setting, but custom stores can also be used, like storing the entries in an SQL database.

How do you run Celerybeat?

This command has used for start the celery beat. Firstly add the django_celery_beat module in installed apps in settings file. And then apply the django migrate command, this will create the tables in admin pannel. After completing all the process like in celery file and create task in tasks.py .

What is Django celery beat?

Using django-celery-beatThis extension enables the user to store periodic tasks in a Django database and manage the tasks using the Django Admin interface.


1 Answers

I was searching for a non-Django database scheduler too a while back, but it looked like there's nothing else. So I took the Django scheduler code and modified it to use SQLAlchemy. Should be even easier to make it use Redis instead.

like image 159
tuomur Avatar answered Oct 11 '22 18:10

tuomur