tracking the progress of a long running geoprocessing service

386
2
Jump to solution
05-27-2014 07:14 AM
TomTyndall
New Contributor III
I have a geoprocessing service that takes a list of x,y locations, snaps them to a road network and reports information about the snapped location (snapped x y, milepost, milepost offset ect...).

This service will sometimes be called with a very large list of locations to process (>10,000) and I want to track the progress of the script. The process will be initiated by a user from a javascript based application.

If I enable Info message level reporting on the service I can use arcpy.AddMessage in the python script that implements the service to report % completion as I work through the list of locations on the server. But this also parrots back all the input parameters (including the entire list of locations) on every call to checkStatus. Very verbose.

I'm searching for a way to report back % completion of the script without having each checkStatus request containing such a large payload.

I tried using the Upload capability of geoprocessing services to upload the large locations list and rewrote the geoprocessing script to accept a GPDataFile parameter of the form, {itemID: "guid"}, thinking that the messages returned in the checkStatus would just parrot back the {itemID: "guid"}; but it doesn't, it still sends back the entire locations list in the messages on checkStatus calls.

Any idea's on how I can accomplish tracking without exchanging such large messages?

I thought about just enabling warning level messages and using arcpy.AddWarning to report % completion but that just seems like using an inappropriate messaging system to report informative messages.

Tom
AZ Dept. of Transportation
0 Kudos
1 Solution

Accepted Solutions
KevinHibma
Esri Regular Contributor
I thought about just enabling warning level messages and using arcpy.AddWarning to report % completion but that just seems like using an inappropriate messaging system to report informative messages.


Thats exactly the method I suggest when presenting the Creating GP Services session if you want fine grain control over what messages come back to a Web App.
The web app has no knowledge if a message is info, warning or error, its just a message you get back and display if you want.
The example here is using AddWarning and the app just grabs/spits those messages to the window:
http://gpdemos.esri.com/demos/uploadcsv/uploadcsv.html 
Find downloads for that service from here http://gpdemos.esri.com/

View solution in original post

0 Kudos
2 Replies
KevinHibma
Esri Regular Contributor
I thought about just enabling warning level messages and using arcpy.AddWarning to report % completion but that just seems like using an inappropriate messaging system to report informative messages.


Thats exactly the method I suggest when presenting the Creating GP Services session if you want fine grain control over what messages come back to a Web App.
The web app has no knowledge if a message is info, warning or error, its just a message you get back and display if you want.
The example here is using AddWarning and the app just grabs/spits those messages to the window:
http://gpdemos.esri.com/demos/uploadcsv/uploadcsv.html 
Find downloads for that service from here http://gpdemos.esri.com/
0 Kudos
TomTyndall
New Contributor III
Thanks Kevin.

I did go ahead and use warning messages and that's giving me what I need.

TT
0 Kudos