Skip to content

Commit

Permalink
Debian redis installation instructions
Browse files Browse the repository at this point in the history
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
maxyz authored and kushaldas committed Mar 19, 2013
1 parent 8e8461e commit 97a78a0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
3 changes: 3 additions & 0 deletions docs/user/redis.rst
Expand Up @@ -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.

Expand All @@ -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.

1 change: 0 additions & 1 deletion examples/consumer.py
@@ -1,4 +1,3 @@
from retask.task import Task
from retask.queue import Queue
queue = Queue('example')
queue.connect()
Expand Down
4 changes: 2 additions & 2 deletions retask/exceptions.py
Expand Up @@ -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."""
2 changes: 1 addition & 1 deletion retask/task.py
Expand Up @@ -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``.
"""

Expand Down
17 changes: 8 additions & 9 deletions tests.py
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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')
Expand All @@ -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.