Permalink
Browse files

doc fix + dashboard main page

  • Loading branch information...
1 parent 38ae5bd commit 9f9926fff5ea23b0b9b40813aebc9ffc78b58428 @gleicon committed Apr 29, 2012
Showing with 10 additions and 8 deletions.
  1. +2 −2 README.rst
  2. +8 −6 src/restmq/web.py
View
@@ -52,7 +52,7 @@ A http client (curl) post to /queue:
Point your browser to http://localhost:8888/c/test
-Run $ curl -d "queue=test&msg=foobar" http://localhost:8888/
+Run $ curl -d "queue=test&value=foobar" http://localhost:8888/
Your browser is acting as a consumer to the queue. Using json encoded data it's easy to fit the data into a js based app.
@@ -68,7 +68,7 @@ The main route is thru /c/<queuename>. It can be tested using curl:
$ curl http://localhost:8888/c/test
-In another terminal, run $ curl -d "queue=test&msg=foobar" http://localhost:8888/
+In another terminal, run $ curl -d "value=foobar" http://localhost:8888/q/test
This is the basic usage pattern for map/reduce (see examples).
View
@@ -74,12 +74,14 @@ class IndexHandler(cyclone.web.RequestHandler):
@authorize("rest_consumer")
@defer.inlineCallbacks
def get(self):
- queue = self.get_argument("queue", None)
- callback = self.get_argument("callback", None)
-
- if queue is None:
- self.render("index.html")
- defer.returnValue(None)
+ try:
+ queue = self.get_argument("queue", None)
+ callback = self.get_argument("callback", None)
+ if queue is None:
+ self.redirect("/static/index.html")
+ defer.returnValue(None)
+ except Exception, e:
+ print e
try:
policy, value = yield self.settings.oper.queue_get(queue)

0 comments on commit 9f9926f

Please sign in to comment.