1

We have a dedicated publishing instance and would like to use it when we run the Unicorn auto-publish.

Currently when running the unicorn sync the publish always uses the CM server, even though we have the DP configured to handle publishing. I believe this is down to how Unicorn auto-publishes. The TriggerAutoPublishSyncedItems pipeline calls ManualPublishQueueHandler and it looks like this is using the Publisher object. Which does not use the Job Manager.:

publisher.PublishWithResult();

This is the class in question:

https://github.com/SitecoreUnicorn/Unicorn/blob/5ba0cc802a116e8fc521b19b08970efb125c94d6/src/Unicorn/Publishing/ManualPublishQueueHandler.cs

Therefore to get this to use the DP instance I assume I'll need to either:

a) Use one of the publishing options that use the Job Manager to process publishing (e.g PublishManager - PublishManager.PublishSmart()) which should therefore use the DP server.

b) Make unicorn available on the DP instance and remotely call the unicorn sync

Am I correct?

If a) and b) are both viable I think I'd prefer to go with a) so we don't have to have include Unicorn and the serialized files on the DP instance. Would I need to write a pipeline that is similar to the TriggerAutoPublishSyncedItems one but swap out the ManualPublishQueueHandler for one which uses PublishManager?

We are using Unicorn 4.0.8.

7
  • Last time I checked, Publishmanager is only available for 8.0 and above. Changing that will break backwards compatibility for older versions. I think that was the reason why this change was not done in unicorn. This is the reason why if publishing service is needed, I would recommend using tds instead of unicorn. Or you can just do a full site publish outside of unicorn sync. This issue has been discussed since 2017 github.com/SitecoreUnicorn/Unicorn/issues/256 Commented Jun 26, 2020 at 23:00
  • Hi Vincent, I think you might be a bit confused, we are not using the publishing service. We instead have a dedicated publishing server (a Cm but with only the publishing config and all it does is publish). We are on Sitecore 8.2 u7 so could use the publishing service if we wished but we are not yet due to some custom pipelines we’d need to migrate. When I say publish manager I mean the class, e.g: PublishManager.PublishSmart(). Also we switched from TDS to unicorn so don’t want to go back to it. Commented Jun 26, 2020 at 23:14
  • First of all, you should always strive to be on the latest public release version. There were changes to how publishing was handled after 4.0.8.
    – Mark Cassidy
    Commented Jun 27, 2020 at 3:20
  • That said, for your setup, consider replacing all of the 3 pipelines in Unicorn.AutoPublishing.Config or even disabling it entirely and just run off a SmartPublish from your publishing instance when done.
    – Mark Cassidy
    Commented Jun 27, 2020 at 3:21
  • Ok thanks @MarkCassidy, sorry for the delayed reply. I've had to prioritise some other work in the short term. I'll upgrade unicorn and then look to swap out the pipelines and see how I get on. Out of interest what were the publishing changes after 4.0.8? Commented Jul 1, 2020 at 23:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.