Skip to content

Commit

Permalink
Suppress publish:end event
Browse files Browse the repository at this point in the history
Add 'Sitecore.Social.Client.MessagePosting.Handlers.PublishEndHandler' to 'publish:end:remote'
  • Loading branch information
AFI authored and AFI committed May 12, 2017
1 parent 01fef5d commit 771ce3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<event name="publishingservice:publishend">
<handler type="Sitecore.Support.Publishing.Service.Events.PublishEndHandler, Sitecore.Support.27341" patch:instead="*[@type='Sitecore.Publishing.Service.Events.PublishEndHandler, Sitecore.Publishing.Service']" method="TriggerPublishEnd" />
</event>
<event name="publish:end:remote">
<handler type="Sitecore.Social.Client.MessagePosting.Handlers.PublishEndHandler, Sitecore.Social.Client" method="ClearDbMesageCache" />
</event>
</events>
</sitecore>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public void TriggerPublishEnd(object sender, EventArgs args)
{
list.Add(publisher.Options);
this._logger.Info("Raising : 'publish:end' for '" + metadata.TargetName + "'", null);
base._eventing.RaiseEvent("publish:end", new object[] { publisher });
publisher.Options.TargetDatabase.RemoteEvents.Queue.QueueEvent<PublishEndRemoteEvent>(new PublishEndRemoteEvent(publisher), true, true);
//base._eventing.RaiseEvent("publish:end", new object[] { publisher }); Sitecore.Support.27341
publisher.Options.TargetDatabase.RemoteEvents.Queue.QueueEvent<PublishEndRemoteEvent>(new PublishEndRemoteEvent(publisher), true, true); // Sitecore.Support.27341
}
}
bool failed = eventData.Status == PublishJobStatus.Complete;
Expand Down

0 comments on commit 771ce3f

Please sign in to comment.