~unity-2d-team/unity-2d/Shell-MultiMonitor

« back to all changes in this revision

Viewing changes to grackle/wsgi.py

  • Committer: William Grant
  • Date: 2012-01-23 00:30:34 UTC
  • Revision ID: william.grant@canonical.com-20120123003034-olw0btbfljnypex0
Extract _make_bounds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import web
23
23
 
24
 
from grackle.server.model import CassandraConnection
 
24
from grackle.model import CassandraConnection
25
25
 
26
26
conn = None
27
27
 
61
61
        except (AttributeError, ValueError):
62
62
            count = 10
63
63
        order = getattr(args, 'order', '-date')
64
 
        start = getattr(args, 'start', '')
65
 
        if start:
66
 
            start = uuid.UUID(start)
67
 
        messages, next_memo = conn.get_messages(name, order, count, start)
 
64
        memo = getattr(args, 'memo', '')
 
65
        prev, messages, next = conn.get_messages(name, order, count, memo)
68
66
        return json.dumps({
 
67
            'prev_memo': prev,
69
68
            'messages': messages,
70
 
            'next_memo': next_memo,
 
69
            'next_memo': next,
71
70
            })
72
71
 
73
72