Yeah i did see that - there are events getting fired by uSync, and there is a public static thing we have to tell our own events we just created a thing.
so you could either listen for the
uSyncService.ImportStarting and uSyncService.ImportComplete events, if you are between these events imports are in progress.
or you could check uSync8BackOffice.eventsPaused which is public static and is true when we don't want our own events to trigger exports during imports
I think really the events are probably the way to go, not 100% sure why we made eventsPaused public - but it is there now and is what uSync uses itself so its not going anywhere.
Suppose the biggest the problem is you don't know if uSync is installed and we don't know if uSkinned is installed?
Guessing you would have a small additional package that listens for the events and sets some form of internal pause value for your code ? (or reflection!!)
Thanks for getting back on this. I think what I am going to do is create a new setting in the backoffice that allows you to disable our node creation events. Then if you are using Content Edition you can temporarily disable our events when the import is happening.
uSync Content Edition and uSkinned
Hi Kevin,
Wondering if you can help with this. We have a number of customers using uSync now and we have an issue with transferring content. See this thread:
https://our.umbraco.com/packages/developer-tools/usynccontentedition/usynccontentedition/102945-usync-used-with-uskinned-import-causing-duplicate-components-folders
Is there a way we can detect if uSync is creating content so that the event we fire to create our page components node can be temporarily ignored?
Cheers,
Marc
Yeah i did see that - there are events getting fired by uSync, and there is a public static thing we have to tell our own events we just created a thing.
so you could either listen for the
uSyncService.ImportStarting
anduSyncService.ImportComplete
events, if you are between these events imports are in progress.or you could check
uSync8BackOffice.eventsPaused
which is public static and is true when we don't want our own events to trigger exports during importsI think really the events are probably the way to go, not 100% sure why we made
eventsPaused
public - but it is there now and is what uSync uses itself so its not going anywhere.Suppose the biggest the problem is you don't know if uSync is installed and we don't know if uSkinned is installed?
Guessing you would have a small additional package that listens for the events and sets some form of internal pause value for your code ? (or reflection!!)
Hi Kevin,
Thanks for getting back on this. I think what I am going to do is create a new setting in the backoffice that allows you to disable our node creation events. Then if you are using Content Edition you can temporarily disable our events when the import is happening.
Cheers,
Marc
is working on a reply...