Author: dmeyer
Date: Sun Oct 14 05:55:45 2007
New Revision: 2866
Log:
kaa.beacon.get now returns an InProgress object
Modified:
trunk/beacon/src/__init__.py
trunk/beacon/src/client.py
Modified: trunk/beacon/src/__init__.py
==============================================================================
--- trunk/beacon/src/__init__.py (original)
+++ trunk/beacon/src/__init__.py Sun Oct 14 05:55:45 2007
@@ -115,8 +115,7 @@
"""
Get object for the given filename. This function will raise an exception if
the client is not connected and the server is not running for a connect.
- If the client is still connecting or reconnecting, this function will block
- using kaa.notifier.step.
+ This function may return an InProgress object.
"""
if not _client:
connect()
Modified: trunk/beacon/src/client.py
==============================================================================
--- trunk/beacon/src/client.py (original)
+++ trunk/beacon/src/client.py Sun Oct 14 05:55:45 2007
@@ -97,6 +97,7 @@
# Public API
# -------------------------------------------------------------------------
+ @kaa.notifier.yield_execution()
def get(self, filename):
"""
Return an object for the given filename.
@@ -104,7 +105,10 @@
filename = os.path.realpath(filename)
if not os.path.exists(filename):
raise OSError('no such file or directory %s' % filename)
- return Query(self, filename=filename).get()
+ q = Query(self, filename=filename)
+ if not q.valid:
+ yield q.wait()
+ yield q.get()
def query(self, **query):
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog