Distributed Task Queue.
Project description
- Version:
1.1.18
- Web:
- Download:
- Source:
- Keywords:
task, queue, job, async, rabbitmq, amqp, redis, python, distributed, actors
What is this?
本项目基于 celery-5.0.5 开发,主要功能:
添加 asyncio 支持,更容易集成到异步web框架
支持 redis 集群
注:项目是 ``celery`` 的超集,但并非所有功能都支持 ``asyncio`` ,并且目前仅完成了 ``redis`` 作为 ``broker`` 和 ``backend`` 的支持。
Get Started
创建任务和官方 celery 一样:
from celery import Celery
app = Celery('hello', broker='redis://:@localhost/')
@app.task(aio_variant=True)
def hello():
return 'hello world'
但增加了 aio_variant 这一参数,相较于普通的任务发送和获取结果的方式:
task = hello.apply_async()
result = task.get()
可以使用:
task = await hello.aio.apply_async()
result = await task.get()
注意
这不只是一个简单的语法糖,而是确实使用 aioredis 替换了原有 redis-py 的同步网络请求。
License
This software is licensed under the New BSD License. See the LICENSE file in the top distribution directory for the full license text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file deepfos_celery-1.1.18-py3-none-any.whl
.
File metadata
- Download URL: deepfos_celery-1.1.18-py3-none-any.whl
- Upload date:
- Size: 441.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90b69e3e31610ea2564bf9328f73f349f2c961b53503ce0b964132fff1267cd9 |
|
MD5 | 8699ea82e4652fd34b55b2d30019e5ea |
|
BLAKE2b-256 | 5c6099800553f6487a9336a9a83f3068fc9701564730e364a7bed22822b965cd |