Skip to content

Commit 40990dd

Browse files
committed
Merge pull request #65 from msabramo/patch-1
README.md: Highlight python
2 parents 1b9ee7d + 68785bf commit 40990dd

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@ Create a sample project and write a simple task :
4949
$ vim tasks.py
5050
```
5151

52-
53-
from mrq.task import Task
54-
import urllib2
55-
56-
class Fetch(Task):
57-
def run(self, params):
58-
f = urllib2.urlopen(params.get("url"))
59-
t = f.read()
60-
f.close()
61-
return len(t)
52+
```python
53+
from mrq.task import Task
54+
import urllib2
55+
56+
class Fetch(Task):
57+
def run(self, params):
58+
f = urllib2.urlopen(params.get("url"))
59+
t = f.read()
60+
f.close()
61+
return len(t)
62+
```
6263

6364
You can now run it using `mrq-run` :
6465
```
@@ -93,7 +94,7 @@ $ mrq-run --async --queue fetches tasks.Fetch url http://www.google.com &&
9394

9495
Now start the dasbhoard with `mrq-dashboard &` and go check your newly created queue and job on [localhost:5555](http://localhost:5555/#jobs)
9596

96-
Instanciate a worker with `mrq-worker` and you can follow it on the dashboard as it executes in parallel all the enqueued jobs
97+
Instantiate a worker with `mrq-worker` and you can follow it on the dashboard as it executes in parallel all the enqueued jobs
9798

9899
```
99100
$ mrq-worker --gevent 10 fetches
@@ -122,4 +123,4 @@ $ mrq-worker --gevent 10 fetches
122123

123124
# More
124125

125-
Full documentation is available on [readthedocs](http://mrq.readthedocs.org/en/latest/)
126+
Full documentation is available on [readthedocs](http://mrq.readthedocs.org/en/latest/)

0 commit comments

Comments
 (0)