All Projects â†’ vjanz â†’ python-asynchronous-tasks

vjanz / python-asynchronous-tasks

Licence: MIT license
😎Asynchronous tasks in Python with Celery + RabbitMQ + Redis

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-asynchronous-tasks

Flower
Real-time monitor and web admin for Celery distributed task queue
Stars: ✭ 5,036 (+13510.81%)
Mutual labels:  rabbitmq, asynchronous, celery
Node Celery
Celery client for Node.js
Stars: ✭ 648 (+1651.35%)
Mutual labels:  queue, rabbitmq, celery
leek
Celery Tasks Monitoring Tool
Stars: ✭ 77 (+108.11%)
Mutual labels:  queue, rabbitmq, celery
dispatcher
Dispatcher is an asynchronous task queue/job queue based on distributed message passing.
Stars: ✭ 60 (+62.16%)
Mutual labels:  queue, tasks, celery
Clearly
Clearly see and debug your celery cluster in real time!
Stars: ✭ 287 (+675.68%)
Mutual labels:  queue, asynchronous, celery
Yii2 Queue
Yii2 Queue Extension. Supports DB, Redis, RabbitMQ, Beanstalk and Gearman
Stars: ✭ 977 (+2540.54%)
Mutual labels:  queue, rabbitmq
Yii Queue
Queue extension for Yii 3.0
Stars: ✭ 38 (+2.7%)
Mutual labels:  queue, rabbitmq
Laravel Queue Rabbitmq
RabbitMQ driver for Laravel Queue. Supports Laravel Horizon.
Stars: ✭ 1,175 (+3075.68%)
Mutual labels:  queue, rabbitmq
Garagemq
AMQP message broker implemented with golang
Stars: ✭ 153 (+313.51%)
Mutual labels:  queue, rabbitmq
Machinery
Machinery is an asynchronous task queue/job queue based on distributed message passing.
Stars: ✭ 5,821 (+15632.43%)
Mutual labels:  queue, rabbitmq
Rabbitevents
Nuwber's events provide a simple observer implementation, allowing you to listen for various events that occur in your current and another application. For example, if you need to react to some event published from another API.
Stars: ✭ 84 (+127.03%)
Mutual labels:  queue, rabbitmq
Flask Rq2
A Flask extension for RQ.
Stars: ✭ 176 (+375.68%)
Mutual labels:  queue, tasks
Arq
Fast job queuing and RPC in python with asyncio and redis.
Stars: ✭ 695 (+1778.38%)
Mutual labels:  queue, tasks
Openmessaging Java
OpenMessaging Runtime Interface for Java
Stars: ✭ 685 (+1751.35%)
Mutual labels:  queue, asynchronous
Shuttle.esb
A highly extensible service bus implementation.
Stars: ✭ 71 (+91.89%)
Mutual labels:  queue, rabbitmq
Ytask
YTask is an asynchronous task queue for handling distributed jobs in golang(go异步任务框架)
Stars: ✭ 121 (+227.03%)
Mutual labels:  queue, celery
logtoes
Demo of Asynchronous pattern (worker) using Python Flask & Celery
Stars: ✭ 49 (+32.43%)
Mutual labels:  asynchronous, celery
async
async is a tiny C++ header-only high-performance library for async calls handled by a thread-pool, which is built on top of an unbounded MPMC lock-free queue.
Stars: ✭ 25 (-32.43%)
Mutual labels:  queue, tasks
theeye-of-sauron
TheEye Dockers and QuickStart
Stars: ✭ 27 (-27.03%)
Mutual labels:  queue, tasks
Jaas
Run jobs (tasks/one-shot containers) with Docker
Stars: ✭ 291 (+686.49%)
Mutual labels:  queue, tasks

python-asynchronous-tasks

Setup & Installation

Create a virtual environment and install the dependencies:

$ python -m venv venv
$ source env/bin/activate

$ pip install -r requirements.txt

Start redis and rabbitmq services with docker-compose:

docker-compose up -d

Verify that the services are up and running:

$ docker ps

# Excepted output
27d1b8ced89a   rabbitmq:latest   "docker-entrypoint.s…"   8 minutes ago   Up 8 minutes   4369/tcp, 5671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:5672->5672/tcp, :::5672->5672/tcp   python-async-tasks_rabbitmq_1
17b72947fb8a   redis:latest      "docker-entrypoint.s…"   8 minutes ago   Up 8 minutes   0.0.0.0:6379->6379/tcp, :::6379->6379/tcp                                                   python-async-tasks_redis_1

Usage

Spin up a new terminal and start the celery worker:

$ celery -A tasks worker -l info --pool=solo

Send a task to celery worker to verify that it's working as excepted: Open a new terminal and get inside python interactive shell, import say_hello function from tasks.py and then call it with delay()

$ python
>>> from tasks import say_hello
>>> say_hello.delay("Valon")
<AsyncResult: 5711efdc-17c7-4f02-bfba-d193c3d28c42>

And in the celery terminal that we started the worker before we should except a result similar to:

INFO/MainProcess] Received task: tasks.say_hello[5711efdc-17c7-4f02-bfba-d193c3d28c42]
INFO/MainProcess] Task tasks.say_hello[5711efdc-17c7-4f02-bfba-d193c3d28c42] succeeded in 5.01600000000326s: 'Hello Valon'

What to do next?

Just expand the usage of the celery, define your tasks and keep doing amazing stuff :)

Contact:

If you have any questions regarding the topic or anything else, feel free to reach to me on:

License

This project is licensed under the terms of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].