Refreshing file system resources in 8.3

We're working towards upgrading our gateways to 8.3 and have run into a bit of a snag. We deploy our updates using Azure to push the updated files directly to the gateway file system. In 8.1 the gateway would scan for file system changes and pick up on updated resources automatically, but in 8.3 that has gone away.

We have a large number of gateways and we deploy to them automatically, so I'm looking for a way to force a resource refresh during our update deployments.

One thought was to use an http call to request the refresh, but that requires configuring an API key on every gateway, and I don't want to deal with doing that on all of our gateways, since we have a lot of them.

My current thinking is to use WebDev to initiate the refresh, but I haven't been able to get that working. Maybe these methods aren't exposed in the Jython?

def doGet(request, session):

    # IgnitionGateway SDK Imports
    from com.inductiveautomation.ignition.gateway import IgnitionGateway
    
    # obtain the gateway context
    gatewayContext = IgnitionGateway.get()
    
    gatewayContext.getConfigurationManager().requestScan()
    gatewayContext.getProjectManager().requestScan()
    
    
    return {'html': "Refresh requested"}    
     

Any help greatly appreciated.

Those look like the right methods, what doesn't work?

(post deleted by author)

Your code works for me without issue in a WebDev python resource.

What version of Ignition is this? Looks to me like you're trying to run this in Ignition 8.1.

Yup, I'm an idiot, lol. Too many gateways in play and I lost track of which I was on...

Sorry about that.

Thanks !

n.b. that can be system.project.requestScan and, as of 8.3.8, system.config.requestScan to drop the IgnitionGateway import.

Move to an async thread if you don't want them to block.