예제 #1
0
        void IInitializeService.Initialize()
        {
            lock (this) {
                migrator.Migrate();
                migrator = null;

                try {
                    OptimizeDatabase();
                } catch (Exception e) {
                    Log.Error("Error determining if ANALYZE is necessary", e);
                }

                // Update cached sorting keys
                BeginTransaction();
                try {
                    SortKeyUpdater.Update();
                    CommitTransaction();
                } catch {
                    RollbackTransaction();
                }
            }

            if (Banshee.Metrics.BansheeMetrics.EnableCollection.Get())
            {
                Banshee.Metrics.BansheeMetrics.Start();
            }

            if (validate_schema)
            {
                ValidateSchema();
            }
        }
예제 #2
0
        void IInitializeService.Initialize()
        {
            lock (this) {
                migrator.Migrate();
                migrator = null;

                try {
                    OptimizeDatabase();
                } catch (Exception e) {
                    Log.Exception("Error determining if ANALYZE is necessary", e);
                }

                // Update cached sorting keys
                SortKeyUpdater.Update();
            }
        }