This content has been marked as final. Show 2 replies
What if you use the del function. For Instance if you connection is like this
SDEConn = arcpy.CreateArcSDEConnectionFile_management (folderName, fileName, serverName, serviceName, databaseName, authType, username, password, saveUserInfo, versionName, saveVersionInfo) del SDEConn
I didn't test it, just curious .
I ended up not using the Clear Workspace Cache tool and couldn't figure out a solution with it. So, we ended up moving the main body of code to a standalone Python script that is called from the Python toolbox using subprocess. Connections aren't getting refreshed in ArcGIS Server, so we had to move the script to its own process that gets called every time. Adds an extra file to run, but it works.