예제 #1
0
        internal void ReorganizeIndexes(List <Sitecore.Takeaway.DistributedDb.Configuration.SyncTable> tables, SqlConnection connection, DbSyncScopeDescription scopeDesc)
        {
            var provision = new SqlSyncScopeProvisioning(connection, scopeDesc);

            try
            {
                Log.Info("[DistributedDb] Reorganize Scope Indexes [" + scopeDesc.ScopeName + "] Start", this);

                provision.CommandTimeout = 3600;
                provision.ReorganizeIndexes(connection, tables);

                Log.Info("[DistributedDb] Reorganize Scope Indexes [" + scopeDesc.ScopeName + "] End", this);
            }
            catch (Exception ex)
            {
                Log.Error("[DistributedDb] Reorganize Scope Indexes [" + scopeDesc.ScopeName + "] Error", ex, this);
            }
        }