public void Process(DbSyncPipelineArgs args) { Log.Info("[DistributedDb] Pipeline ReorganizeIndexesClient Start - " + args.Server, this); var syncManager = new DbSyncManager(); syncManager.Client.ReorganizeIndexes(); args.Databases = syncManager.Client.Databases; Log.Info("[DistributedDb] Pipeline ReorganizeIndexesClient End - " + args.Server, this); }
public void Process(DbSyncPipelineArgs args) { Log.Info("[DistributedDb] Pipeline ProvisionTriggerAndProcedureUpdatesClient Start - " + args.Server, this); var syncManager = new DbSyncManager(); syncManager.Client.ProvisionTriggerAndProcedureUpdates(); args.Databases = syncManager.Client.Databases; Log.Info("[DistributedDb] Pipeline ProvisionTriggerAndProcedureUpdatesClient End - " + args.Server, this); }
public void Process(DbSyncPipelineArgs args) { Log.Info("[DistributedDb] Pipeline DeprovisionServer Start - " + args.Server, this); var syncManager = new DbSyncManager(); syncManager.Server.Deprovision(); args.Databases = syncManager.Server.Databases; Log.Info("[DistributedDb] Pipeline DeprovisionServer End - " + args.Server, this); }
public void Process(DbSyncPipelineArgs args) { Log.Info("[DistributedDb] Pipeline TruncateClientTables Start - " + args.Server, this); var syncManager = new DbSyncManager(); syncManager.Client.TruncateClientTables(); args.Databases = syncManager.Client.Databases; Log.Info("[DistributedDb] Pipeline TruncateClientTables End - " + args.Server, this); }
public void Process(DbSyncPipelineArgs args) { Log.Info("[DistributedDb] Pipeline Synchronize Start - " + args.Server, this); var syncManager = new DbSyncManager(); args.Statistics = syncManager.Client.Synchronize(); args.Databases = syncManager.Client.Databases; Log.Info("[DistributedDb] Pipeline Synchronize End - " + args.Server, this); }
public string Execute(string sitecoreInstance, string pipeline) { var writer = new StringWriter(); var output = new XmlTextWriter(writer); output.WriteStartElement("result"); if (string.IsNullOrEmpty(sitecoreInstance)) { sitecoreInstance = Context.Site.Name; } try { Log.Info("[DistributedDb] Rocks Request " + pipeline + " Start - " + sitecoreInstance, this); StartJob(sitecoreInstance, pipeline); output.WriteStartElement("pipeline"); output.WriteString(pipeline); output.WriteEndElement(); output.WriteStartElement("pipelineResult"); var result = new DbSyncPipelineResult(); var syncManager = new DbSyncManager(); result.Pipeline = pipeline; if (syncManager.Server.Databases != null) { result.Databases = syncManager.Server.Databases.Select(db => db.Scope).ToList(); } else { throw new Exception("no databases found"); } output.WriteCData(new Serializer().Serialize <DbSyncPipelineResult>(result)); output.WriteEndElement(); Log.Info("[DistributedDb] Rocks Request " + pipeline + " End - " + sitecoreInstance, this); } catch (Exception ex) { Log.Error("[DistributedDb] Rocks Request " + pipeline + " Error - " + sitecoreInstance, ex, this); output.WriteStartElement("error"); output.WriteString(ex.Message + " - " + ex.StackTrace); output.WriteEndElement(); } output.WriteEndElement(); return(writer.ToString()); }