I created a reconcile and post geoprocessing service and added it to a web appbuilder application. The service and widget work well except that my messages in the output don't come in the same order every time. The image I've included shows three consecutive runs of the process and three different message orders. Has anyone seen something like this before and can help me troubleshoot?
Thanks,
Brandon
Solved! Go to Solution.
Brandon,
I see that "Reconciling and Posting Edits" always comes before "Reconcile and Post Completed Successfully. Edits are Saved". This is good. It's the "DERP_Editing Version Exists" message that is moving around. Not sure what that is, but it looks like this may just be the result of asynchronous behavior.
Larry
Brandon,
I see that "Reconciling and Posting Edits" always comes before "Reconcile and Post Completed Successfully. Edits are Saved". This is good. It's the "DERP_Editing Version Exists" message that is moving around. Not sure what that is, but it looks like this may just be the result of asynchronous behavior.
Larry
Hi Larry,
Thanks for the reply. Would switching it to synchronous be a way to confirm that asynchronous is causing the issues? The process is working correctly, but I see the messaging being confusing.
Brandon
Hard to say without seeing the source code. In my last job, I had a Python script that did the reconciles and posts every morning, plus lots of other stuff too. I wrote two log files, one at the error level, which I had the servers email to me, and one at the debug level for debugging.
Hi Larry,
I switched it to synchronous and the issue seems to be resolved. I'm including my code for those interested.
import arcpy from configuration import Configuration from v10_2 import ROOT_PATH versionlist = [] path = ROOT_PATH name = "DERP_Editing" # databaseconnection = path + "\\" + name + '.sde' arcpy.SetParameterAsText(0, "Reconciling and Posting Edits") if arcpy.Exists(path + "\\" + name + '.sde'): arcpy.SetParameterAsText(1, "DERP_Editing Version Exists" ) else: connection_info = Configuration() if connection_info.credentials_are_valid() == False: raise Exception() arcpy.CreateDatabaseConnection_management(path, name, 'ORACLE', connection_info.instance01, 'DATABASE_AUTH', connection_info.useridsde, connection_info.passwordsde, 'SAVE_USERNAME') for version in arcpy.ListVersions(databaseconnection): versionlist.append(version) print versionlist if "SDE.DERP_Editing" in versionlist: arcpy.ReconcileVersions_management(databaseconnection, "ALL_VERSIONS", "SDE.webCommon", "SDE.DERP_Editing", "LOCK_ACQUIRED", "NO_ABORT", "BY_OBJECT", "FAVOR_EDIT_VERSION", "POST", "KEEP_VERSION") arcpy.ReconcileVersions_management(databaseconnection, "ALL_VERSIONS", "SDE.DEFAULT", "SDE.webCommon", "LOCK_ACQUIRED", "NO_ABORT", "BY_OBJECT", "FAVOR_EDIT_VERSION", "POST", "KEEP_VERSION") print 'Reconciling Complete' arcpy.SetParameterAsText(2, "Reconcile and Post Completed Successfully. Edits are saved" ) else: #Create webCommon version off DEFAULT inWorkspace = databaseconnection parentVersion = "SDE.DEFAULT" versionName = "webCommon" #Execute CreateVersion arcpy.CreateVersion_management(inWorkspace, parentVersion, versionName, "PUBLIC") print "Created webCommon" inWorkspace = databaseconnection parentVersion = "SDE.webCommon" versionName = "DERP_Editing" #Execute CreateVersion arcpy.CreateVersion_management(inWorkspace, parentVersion, versionName, "PUBLIC") print "Created DERP_Editing"