diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6387457 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.pyc +dump.rdb + +/*.egg-info diff --git a/README.md b/README.md new file mode 100644 index 0000000..94bdbf4 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# WARNING: DON'T USE THIS IN PRODUCTION (yet) + +# rq — Simple job queues for Python + +**rq** is an attempt at a lightweight Python job queue, using Redis as the +queue provider. + + +### Installation + +Simply use the following command to install the latest released version: + + pip install rq + +If you want the cutting edge version (that may well be broken), use this: + + pip install -e git+git@github.com:nvie/rq.git@master#egg=rdb + diff --git a/run_tests b/run_tests new file mode 100755 index 0000000..d42ef9d --- /dev/null +++ b/run_tests @@ -0,0 +1,12 @@ +#!/bin/sh +check_redis_running() { + redis-cli echo "just checking" > /dev/null + return $? +} + +if check_redis_running; then + /usr/bin/env python -m unittest discover -v -s tests $@ 2>&1 | egrep -v '^test_' +else + echo "Redis not running." >&2 + return 2 +fi diff --git a/tests/test_rq.py b/tests/test_rq.py new file mode 100644 index 0000000..8cc1200 --- /dev/null +++ b/tests/test_rq.py @@ -0,0 +1,25 @@ +import unittest +from blinker import signal +from redis import Redis + +testconn = Redis() + +class RQTestCase(unittest.TestCase): + def setUp(self): + super(RQTestCase, self).setUp() + testconn.flushdb() + signal('setup').send(self) + + def tearDown(self): + signal('teardown').send(self) + testconn.flushdb() + super(RQTestCase, self).tearDown() + + +class TestRQ(RQTestCase): + def test_math(self): + assert 1 + 2 == 3 + + +if __name__ == '__main__': + unittest.main()