- 授权协议: BSD
- 开发语言: Python
- 操作系统: 跨平台
- 软件首页: http://python-rq.org/
- 软件文档: http://python-rq.org/docs/
软件介绍
RQ (Redis Queue) 是一个简单的 Python 库,用于实现作业的队列,并在后台进行处理。后端基于 Redis ,可方便集成到 Web 应用中,要求 Redis >= 2.6.0
示例代码:
from rq import Queue
from redis import Redis
from somewhere import count_words_at_url
# Tell RQ what Redis connection to use
redis_conn = Redis()
q = Queue(connection=redis_conn) # no args implies the default queue
# Delay execution of count_words_at_url('http://nvie.com')
job = q.enqueue(count_words_at_url, 'http://nvie.com')
print job.result # => None
# Now, wait a while, until the worker is finished
time.sleep(2)
print job.result # => 889后台作业处理 worker:
$ rqworker
*** Listening for work on default
Got count_words_at_url('http://nvie.com') from default
Job result = 818
*** Listening for work on default
Functional Programming in Scala
Paul Chiusano、Rúnar Bjarnason / Softbound print / 2014-9-14 / USD 44.99
Functional programming (FP) is a programming style emphasizing functions that return consistent and predictable results regardless of a program's state. As a result, functional code is easier to test ......一起来看看 《Functional Programming in Scala》 这本书的介绍吧!
