Author: dmeyer
Date: Sat Oct 20 05:29:06 2007
New Revision: 2877
Log:
use InProgress for kaa.beacon.get_db_info if not connected
Modified:
trunk/beacon/bin/beacon-search
trunk/beacon/src/client.py
Modified: trunk/beacon/bin/beacon-search
==============================================================================
--- trunk/beacon/bin/beacon-search (original)
+++ trunk/beacon/bin/beacon-search Sat Oct 20 05:29:06 2007
@@ -205,6 +205,9 @@
if mode == 'info':
info = kaa.beacon.get_db_info()
+ if isinstance(info, kaa.notifier.InProgress):
+ yield info
+ info = info.get_result()
print 'Beacon database information:'
print
print 'Total objects:'.rjust(20), info['total']
Modified: trunk/beacon/src/client.py
==============================================================================
--- trunk/beacon/src/client.py (original)
+++ trunk/beacon/src/client.py Sat Oct 20 05:29:06 2007
@@ -167,6 +167,17 @@
self.rpc('monitor.directory', directory)
+ @kaa.notifier.yield_execution()
+ def get_db_info(self):
+ """
+ Returns information about the database. Look at
+ kaa.db.Database.get_db_info() for more details.
+ """
+ if self.status != CONNECTED:
+ yield kaa.notifier.YieldCallback(self.signals['connect'])
+ yield self._db.get_db_info()
+
+
def register_inverted_index(self, name, *args, **kwargs):
"""
Register new inverted index.
-------------------------------------------------------------------------
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