Changelog

Python Icon changelog.com

rq - Simple job queues for Python

logged by @logbot 2012-03-28T19:40:57Z permalink #python

Vincent Driessen of git flow fame has released, rq a simple, Redis-backed queuing library for Python.

Long-running function calls can be added to a queue with a familiar enqueue method:

import requests

def count_words_at_url(url):
    resp = requests.get(url)
    return len(resp.text.split())

# elsewhere
from my_module import count_words_at_url
result = q.enqueue(count_words_at_url, 'http://nvie.com')

As always, Vincent has a stylish project page and detailed introductory blog post.

If you like Resque but sling Python and would rather use something for which you could hack the internals, you might give rq a shot.

0:00 / 0:00