Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • vapenation 21 posts 139 karma points
    Dec 08, 2016 @ 08:07
    vapenation
    0

    Usync doesn't import on change

    I have two Umbraco sites, SiteA and SiteB. I also have c# program (called by Octopus Deploy, our release software) which transfers the content of the Usync folder from SiteA to SiteB along with the media folder.

    I've set SiteB to trigger the import on any changes and at startup however, when I logon to SiteB, no data has been important. This seems to be a problem mainly for pictures and content. When I trigger an import manually from BackOffice, all content is synced in just fine.

    I have 3 questions:

    1. Is the WatchForFileChanges triggered only when a new physical file is added to the directory or will it also detect changes within the XML?

    2. What does the "Auto Sync" option do? It says it imports on Startup but what is defined as StartUp and why is no import triggered when I logon to SiteB's Backoffice? I can see in the log that no important has been made.

    3. What's best practice for fixing so that SiteB automatically imports any and all changes from the usync directory whenever the director is updated with new content?

    Thanks in advance!

    Here's my config:

        <Folder>~/uSync/data/</Folder>
    <Import>true</Import>
    <ExportAtStartup>false</ExportAtStartup>
    <ExportOnSave>false</ExportOnSave>
    <WatchForFileChanges>true</WatchForFileChanges>
    <ArchiveVersions>true</ArchiveVersions>
    <ArchiveFolder>~/uSync/Archive/</ArchiveFolder>
    <BackupFolder>~/uSync/Backup/</BackupFolder>
    <MaxArchiveVersionCount>10</MaxArchiveVersionCount>
    <DontThrowErrors>false</DontThrowErrors>
    <Handlers Group="default" EnableMissing="true">
        <HandlerConfig Name="uSync: DataTypeHandler" Enabled="true" Actions="All" />
        <HandlerConfig Name="uSync: TemplateHandler" Enabled="true" Actions="All" />
        <HandlerConfig Name="uSync: ContentTypeHandler" Enabled="true" Actions="All" />
        <HandlerConfig Name="uSync: MediaTypeHandler" Enabled="true" Actions="All" />
        <HandlerConfig Name="uSync: LanguageHandler" Enabled="true" Actions="All" />
        <HandlerConfig Name="uSync: DictionaryHandler" Enabled="true" Actions="All" />
        <HandlerConfig Name="uSync: MacroHandler" Enabled="true" Actions="All" />
        <HandlerConfig Name="uSync: DataTypeMappingHandler" Enabled="true" Actions="All" />
        <HandlerConfig Name="uSync: MemberTypeHandler" Enabled="false" Actions="All" />
    </Handlers>
    
  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Dec 08, 2016 @ 08:27
    Kevin Jump
    100

    Hello.

    1. WatchForFileChanges , is meant ot be triggerd when ever a file changes within the uSync folder, and after a short wait (around 4 seconds incase you are copying loads of files) it triggers an import of the folder.

    however it has been a bit flaky for a version or two, and i haven't fully got to the bottom of why - yet (https://github.com/KevinJump/uSync/issues/10)

    1. AutoSync sets import to work at startup - startup is the when the site starts in IIS (so app pool reset, iis restart, critical file changes...) if you are using octopus this should be triggered when octopus deploys to the site.

    2. the best practice would be to have the site startup after deployment, and i would have thought that happens with octopus deploy - i would check that umbraco doesn't think it's starting in the log file (app_data/logs)

    it's also worth noting (as in the other post) uSync won't log an action file if no changes happen at all. It will log everything in the above log file but the history section will only get something if there is an actual change made

  • vapenation 21 posts 139 karma points
    Dec 08, 2016 @ 09:25
    vapenation
    0

    Our deployment process involves actually updating the staging Umbraco using Usync (by copying all content from the usync folder in production) and then simply restoring the production Umbraco database from the staging Umbraco. Therefore, the sync isn't triggered at startup, because there is no IIS restart or anything of the like.

    I think I'll solve this by simply calling the Import directly in code as I mentioned in my other post. Thanks for your reply!

Please Sign in or register to post replies

Write your reply to:

Draft