From 3aef273d677afd5b1198ea02fdaa6ce880415472 Mon Sep 17 00:00:00 2001 From: "locklainn.linden" Date: Thu, 14 Aug 2008 15:35:00 +0000 Subject: [PATCH] both ad and sim event queue working in threads, fully! --- pyogp/lib/base/regiondomain.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyogp/lib/base/regiondomain.py b/pyogp/lib/base/regiondomain.py index 882ed84..5560c68 100644 --- a/pyogp/lib/base/regiondomain.py +++ b/pyogp/lib/base/regiondomain.py @@ -51,8 +51,8 @@ class EventQueueGet(grok.Adapter): def __init__(self, context): """initialize this adapter""" - self.context = context - + self.context = context + self.last_id = -1 # let's retrieve the cap we need self.seed_cap = self.context.seed_cap # ISeedCapability print self.seed_cap @@ -61,5 +61,8 @@ class EventQueueGet(grok.Adapter): def __call__(self, data = {}): """initiate the event queue get request""" + if self.last_id != -1: + data = {'ack':self.last_id, 'done':False} result = self.cap.POST(data) + self.last_id = result['id'] return result