Python3的后台处理。

remoulade的Python项目详细描述


去除

CircleCIPyPI versionDocumentation

一个快速可靠的python 3分布式任务处理库。


changeloghttps://remoulade.readthedocs.io/changelog.html
文档https://remoulade.readthedocs.io


安装

如果要与RabbitMQ一起使用

pipenv install 'remoulade[rabbitmq, watch]'

或者如果你想和Redis一起使用

pipenv install 'remoulade[redis, watch]'

快速启动

确保运行了RabbitMQ,然后创建一个名为 example.py

importremouladeimportrequestsimportsys@remoulade.actordefcount_words(url):response=requests.get(url)count=len(response.text.split(" "))print(f"There are {count} words at {url!r}.")if__name__=="__main__":count_words.send(sys.argv[1])

在一个终端中,运行您的工人:

remoulade example

在另一个队列中,开始排队消息:

python example.py http://example.com
python example.py https://github.com
python example.py https://news.ycombinator.com

查看user guide了解更多!

许可证

Remoulade根据LGPL获得许可。请看COPYINGCOPYING.LESSER获取授权详细信息。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何从旧的ArrayList<ArrayList<Integer>>创建新的ArrayList而不更改旧的?   java JBoss 7 |从随机线程写入jndi   java如何在数据库中有空值的JPA实体中迭代联接列   java Android应用程序在setContentView上崩溃   java如何在表单中预先填充文本字段,其中包含数据库中的信息。jsp?   来自R.raw的java Android文件阅读器。文件   如何将多个WAR(或Java Web应用程序,特别是使用Spring MVC)嵌入到一个承载另一个WAR的网页中?   java动态更新Jlist   gwt分页大结果集Java的最佳方式是什么   JavaCDI:为什么我的瞬态字段被序列化?   使用JAXB更新java XML模板文件   java getGraphics()返回空值   扩展javax的java类。ws。rs.core。无法将应用程序强制转换为Servlet   java方法可能无法在异常时关闭流   公共类的表达式的java非法开始   java年轻一代GC在EXT根扫描上花费了太多时间   使用CXF和具有未发布元数据的WSDL的java