Skip to content
Browse files

Debian redis installation instructions

Some minor typos corrections

Replace some indented blank lines with newlines

Remove unneeded imports in example files

Signed-off-by: Kushal Das <kushaldas@gmail.com>
  • Loading branch information...
1 parent 8e8461e commit 97a78a08f98bb2929de137ce4d1b02a11186daa9 @maxyz maxyz committed with Mar 19, 2013
Showing with 14 additions and 13 deletions.
  1. +3 −0 docs/user/redis.rst
  2. +0 −1 examples/consumer.py
  3. +2 −2 retask/exceptions.py
  4. +1 −1 retask/task.py
  5. +8 −9 tests.py
View
3 docs/user/redis.rst
@@ -3,6 +3,7 @@
Setting up the Redis Server
===========================
You can download and install `Redis <http://redis.io>`_ on your distro.
+
In `Fedora <http://fedoraproject.org>`_ you can just ``yum install redis``
for the same.
@@ -19,4 +20,6 @@ On Fedora you can start the service as *root*:
# systemctl enable redis.service
# systemctl start redis.service
+In `Debian <http://debian.org>`_ just install the redis-server package with
+``apt-get install redis-server`` to have a redis server running.
View
1 examples/consumer.py
@@ -1,4 +1,3 @@
-from retask.task import Task
from retask.queue import Queue
queue = Queue('example')
queue.connect()
View
4 retask/exceptions.py
@@ -9,7 +9,7 @@
"""
class RetaskException(RuntimeError):
- """Some ambigous exception occured"""
+ """Some ambiguous exception occured"""
class ConnectionError(RetaskException):
- """A Connection error occurred."""
+ """A Connection error occurred."""
View
2 retask/task.py
@@ -35,7 +35,7 @@ class Task(object):
Returns a new Task object, the information for the task is passed through
argument ``data``
- :kwarg data: Python object which contains information for the task. Should be serialzable through ``JSON``.
+ :kwarg data: Python object which contains information for the task. Should be serializable through ``JSON``.
"""
View
17 tests.py
@@ -3,7 +3,6 @@
from mock import patch
from retask.task import Task
from retask.queue import Queue
-from pprint import pprint
class ConnectTest(unittest.TestCase):
@@ -19,7 +18,7 @@ def runTest(self):
class LengthTest(unittest.TestCase):
"""
Tests the length method of the Queue
-
+
"""
@patch('redis.Redis')
def runTest(self, mock_redis):
@@ -33,7 +32,7 @@ def runTest(self, mock_redis):
class SetTest(unittest.TestCase):
"""
Sets a task in the Queue
-
+
"""
def runTest(self):
queue = Queue('testqueue')
@@ -49,24 +48,24 @@ def tearDown(self):
class GetTest(unittest.TestCase):
"""
Gets a task in the Queue
-
+
"""
def setUp(self):
queue = Queue('testqueue')
queue.connect()
t = Task({'name':'kushal'})
queue.enqueue(t)
-
-
+
+
def runTest(self):
queue = Queue('testqueue')
queue.connect()
task = queue.dequeue()
i = task.data
self.assertEqual(task.data['name'], 'kushal')
-
+
if __name__ == '__main__':
unittest.main()
-
-
+
+

0 comments on commit 97a78a0

Please sign in to comment.
Something went wrong with that request. Please try again.