How to getmessages on GpServer

1782
4
Jump to solution
05-15-2014 07:14 AM
Andréde_Mattos_Ferraz
Occasional Contributor
Hi everyone,

I have this code and I want to get the messages on my GpServer. But always when I run my job (GpServer) I dont receive any message:

{
"jobId": "j5610ce97f1a04b2991a14bdb82ddc17b",
"jobStatus": "esriJobSucceeded",
"results": {

},
"inputs": {

},
"messages": [

]
}

print "Inicio teste"
arcpy.SetProgressorLabel("Iteration: 1")
arcpy.SetProgressorPosition(1)
arcpy.AddMessage("Teste1")
arcpy.AddMessage("Teste2")
#time.sleep(5)
arcpy.SetProgressorLabel("Iteration: 2")
arcpy.SetProgressorPosition(50)
arcpy.AddMessage("Teste3")
#time.sleep(5)
arcpy.AddWarning("Warning")
arcpy.SetProgressorLabel("Iteration: 3")
arcpy.SetProgressorPosition(100)
arcpy.AddIDMessage("INFORMATIVE", 12, "aaaaaaaaaaaaaaa")
arcpy.AddError("Erro")
print arcpy.GetMessageCount()
print arcpy.GetMessages()
for msg in range(0, arcpy.GetMessageCount()):
    arcpy.AddReturnMessage(msg)
print "Fim teste"


How I can get all messages when I check jobstatus?[ATTACH=CONFIG]33839[/ATTACH]

Thx in advance
0 Kudos
1 Solution

Accepted Solutions
DaleHoneycutt
Regular Contributor
Did you specify you wanted to get messages in the Service Editor Parameters?  See http://resources.arcgis.com/en/help/main/10.2/#/Parameters/005700000080000000/

View solution in original post

0 Kudos
4 Replies
DaleHoneycutt
Regular Contributor
Did you specify you wanted to get messages in the Service Editor Parameters?  See http://resources.arcgis.com/en/help/main/10.2/#/Parameters/005700000080000000/

View solution in original post

0 Kudos
Andréde_Mattos_Ferraz
Occasional Contributor
Did you specify you wanted to get messages in the Service Editor Parameters?  See http://resources.arcgis.com/en/help/main/10.2/#/Parameters/005700000080000000/


Works fine! Thx!!!
0 Kudos
Andréde_Mattos_Ferraz
Occasional Contributor
It's possible to get progress info, or I need to cheat by AddMessage?
0 Kudos
DaleHoneycutt
Regular Contributor
you'll have to cheat with AddMessages.
0 Kudos