[tomboy/autosync: 238/241] [sync] check every 30 seconds, not 5, more debugging
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tomboy/autosync: 238/241] [sync] check every 30 seconds, not 5, more debugging
- Date: Mon, 25 Jan 2010 19:38:20 +0000 (UTC)
commit 5d2ace36791c3614328cf6286e3f04924d7b2f3f
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Mon Jan 25 02:07:05 2010 -0800
[sync] check every 30 seconds, not 5, more debugging
Tomboy/Synchronization/SyncManager.cs | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/Tomboy/Synchronization/SyncManager.cs b/Tomboy/Synchronization/SyncManager.cs
index 1faff77..da6cfb5 100644
--- a/Tomboy/Synchronization/SyncManager.cs
+++ b/Tomboy/Synchronization/SyncManager.cs
@@ -200,7 +200,7 @@ namespace Tomboy.Sync
// TODO: Prefs, etc
// TODO: No need to do this on main loop
- GLib.Timeout.Add (5000, BackgroundSyncChecker);
+ GLib.Timeout.Add (30000, BackgroundSyncChecker);
}
static bool BackgroundSyncChecker ()
@@ -220,12 +220,16 @@ namespace Tomboy.Sync
}
// Wasteful to check when we'll sync anyway
// TODO: Unless we want to show a bubble when server has updates for users that don't autosync
- if (!clientHasUpdates)
+ if (!clientHasUpdates) {
+ Logger.Debug ("BackgroundSyncChecker: No client updates; checking with server");
serverHasUpdates = server.UpdatesAvailableSince (client.LastSynchronizedRevision);
+ }
addin.PostSyncCleanup (); // Let FUSE unmount, etc
- if (clientHasUpdates || serverHasUpdates)
- ; // TODO: Sync!
+ if (clientHasUpdates || serverHasUpdates) {
+ Logger.Debug ("BackgroundSyncChecker: Detected that sync would be a good idea now");
+ // TODO: Sync!
+ }
}
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]