Getting Timeout Message in the Console

730
0
03-15-2017 01:56 PM
LloydBronn
Occasional Contributor II

I have a GP tool that creates a PDF report from a map click. I'm testing running multiple reports simultaneously from different browsers. If I run two reports, one will return a PDF to the popup, and the other displays the PDF for a brief instant and then displays "Unable to generate report." If I click on the GP tool again, the report will popup, because I have set the script to check to see if a report has already been generated for that location. In the console log, I see "Timeout Exceeded." This happens after about a minute, even thought the report has obviously been generated. Do I need to set a higher timeout limit?  

Here is my code snippet. The clearInteval function is for animated dots while the report is being generated, not related to the timeout.  

function gpreportResultAvailable(results, messages){
                     domAttr.set(dom.byId("reportLink"),"innerHTML", "Forecast Report");
                    
                     window.map.infoWindow.clearFeatures();
                     
                     var contentResult;
                     
                     results = true;
                     
                     if(results){
                           contentResult ='<a target="_blank" href="' + reportPath + '"><IMG SRC="' + pdfIcon + '"width=25% height=25%/></a>';
                     }
                     else{
                           contentResult = "Unable To Generate Report";
                     }
                     clearInterval(dots);
                     window.map.infoWindow.resize(256,256);
                     window.map.infoWindow.setContent(contentResult);
                     window.map.infoWindow.setTitle(displayCountry + " Forecast Analysis Report");
     
                    };
0 Kudos
0 Replies