zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #04230
[Branch ~zeitgeist/zeitgeist/bluebird] Rev 292: Let fts write into bluebird directory
------------------------------------------------------------
revno: 292
committer: Michal Hruby <michal.mhr@xxxxxxxxx>
branch nick: bb-fts
timestamp: Mon 2011-10-10 16:44:49 +0200
message:
Let fts write into bluebird directory
modified:
extensions/fts-python/constants.py
extensions/fts.vala
--
lp:~zeitgeist/zeitgeist/bluebird
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird
Your team Zeitgeist Framework Team is subscribed to branch lp:~zeitgeist/zeitgeist/bluebird.
To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'extensions/fts-python/constants.py'
--- extensions/fts-python/constants.py 2011-10-10 14:07:42 +0000
+++ extensions/fts-python/constants.py 2011-10-10 14:44:49 +0000
@@ -45,7 +45,7 @@
class _Constants:
# Directories
DATA_PATH = os.environ.get("ZEITGEIST_DATA_PATH",
- BaseDirectory.save_data_path("zeitgeist"))
+ BaseDirectory.save_data_path("bluebird"))
DATABASE_FILE = os.environ.get("ZEITGEIST_DATABASE_PATH",
os.path.join(DATA_PATH, "activity.sqlite"))
DATABASE_FILE_BACKUP = os.environ.get("ZEITGEIST_DATABASE_BACKUP_PATH",
=== modified file 'extensions/fts.vala'
--- extensions/fts.vala 2011-10-09 22:25:45 +0000
+++ extensions/fts.vala 2011-10-10 14:44:49 +0000
@@ -82,6 +82,13 @@
Variant filter_templates, uint offset, uint count, uint result_type,
out Variant events) throws Error
{
+ debug ("Performing search for %s", query_string);
+ if (siin == null || !(siin is DBusProxy))
+ {
+ throw new EngineError.DATABASE_ERROR (
+ "Not connected to SimpleIndexer");
+ }
+ var timer = new Timer ();
DBusProxy proxy = (DBusProxy) siin;
var b = new VariantBuilder (new VariantType ("(s(xx)a(asaasay)uuu)"));
b.add ("s", query_string);
@@ -91,7 +98,6 @@
b.add ("u", count);
b.add ("u", result_type);
var result = yield proxy.call ("Search", b.end (), 0, -1, null);
- debug ("%s: %s", Log.METHOD, result.get_type_string ());
events = result.get_child_value (0);
/* FIXME: this somehow doesn't work :(
* but it's fixable in a similar way as this method's signature
@@ -100,6 +106,7 @@
var result = yield siin.search (query_string, time_range,
filter_templates, offset, count, result_type);
*/
+ debug ("Got %u results from indexer (in %f seconds)", (uint) events.n_children (), timer.elapsed ());
return result.get_child_value (1);
}