From 68785bfb1d731c511bd2abb4c6d30935bbe81478 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Mon, 5 Jan 2015 22:57:40 -0800 Subject: [PATCH] README.md: Highlight python And fix a spelling error. --- README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4514a85c..c070cd85 100644 --- a/README.md +++ b/README.md @@ -49,16 +49,17 @@ Create a sample project and write a simple task : $ vim tasks.py ``` - - from mrq.task import Task - import urllib2 - - class Fetch(Task): - def run(self, params): - f = urllib2.urlopen(params.get("url")) - t = f.read() - f.close() - return len(t) +```python +from mrq.task import Task +import urllib2 + +class Fetch(Task): + def run(self, params): + f = urllib2.urlopen(params.get("url")) + t = f.read() + f.close() + return len(t) +``` You can now run it using `mrq-run` : ``` @@ -93,7 +94,7 @@ $ mrq-run --async --queue fetches tasks.Fetch url http://www.google.com && Now start the dasbhoard with `mrq-dashboard &` and go check your newly created queue and job on [localhost:5555](http://localhost:5555/#jobs) -Instanciate a worker with `mrq-worker` and you can follow it on the dashboard as it executes in parallel all the enqueued jobs +Instantiate a worker with `mrq-worker` and you can follow it on the dashboard as it executes in parallel all the enqueued jobs ``` $ mrq-worker --gevent 10 fetches @@ -122,4 +123,4 @@ $ mrq-worker --gevent 10 fetches # More -Full documentation is available on [readthedocs](http://mrq.readthedocs.org/en/latest/) \ No newline at end of file +Full documentation is available on [readthedocs](http://mrq.readthedocs.org/en/latest/)