void SaveStateAndReschedule(AccountSyncState syncState, AccountSyncStateStore store, CrawlPlan crawlPlan)
        {
            Log.Info ("Sync finished");

            // If the crawl plan completed successfully, then update the
            // last update time, otherwise leave the last update time the same
            // so that we can try to crawl again next time around.
            // The crawl may abort if delicious starts returning 503s
            if (! crawlPlan.HasNextCommand ())
            {
                syncState.UpdateLastSyncTime ();
            }

            try
            {
                store.SaveSyncState (syncState);
            }
            catch (Exception e)
            {
                Log.Error (e, "Error saving sync state");
            }

            RescheduleCrawl ();
        }