EAImvertor.EAImvertorJob.getJobReport C# (CSharp) Method

getJobReport() private method

private getJobReport ( ) : void
return void
        private void getJobReport()
        {
            var xmlReport = getReport(this.reportUrl);
            if (xmlReport != null)
            {
                var statusNode = xmlReport.SelectSingleNode("//status");
                if (statusNode != null)
                {
                    string jobStatus = statusNode.InnerText;
                    //set the status
                    this.setStatus(jobStatus);
                    if (this.status == "Queued" || this.status == "In Progress" )//if status queued or in progress then try again
                    {
                        if (this.status == "Queued"
                            && ! string.IsNullOrEmpty(this._jobID)
                            && ! this._startRequested)
                        {
                            requestStart();
                        }
                        //check tracking status if "In Pogress"
                        if (this.status == "In Progress")
                        {
                            var tracknode = xmlReport.SelectSingleNode("//track");
                            if (tracknode != null)
                            {
                                this.setMessages(xmlReport);
                                this.setStatus(this.status);
                            }
                        }
                        if((DateTime.Now - this._startDateTime).Seconds < _settings.timeOutInSeconds ) //if not timed out yet)
                        {
                            //wait the interval
                            Thread.Sleep(new TimeSpan(0,0,_settings.retryInterval));
                            //then try again
                            this.tries++;
                            getJobReport();
                        }
                        else
                        {
                            this._timedOut = true;
                            this.setStatus(this.status);
                        }
                    }

                    else if (this.status == "Compiled")
                    {
                        //get the zip url
                        var zipNode = xmlReport.SelectSingleNode("//zip");
                        if (zipNode != null)
                        {
                            this._zipUrl = this.settings.imvertorURL + zipNode.InnerText;
                            this.setStatus("Getting Results");
                            this.downloadZip();
                        }
                        //get the report doc url
                        var docNode = xmlReport.SelectSingleNode("//doc");
                        if (docNode != null)
                        {
                            this._docUrl = this.settings.imvertorURL + docNode.InnerText;
                        }
                        //set the mesages
                        setMessages(xmlReport);
                        //set the status
                        this.setStatus("Finished");
                    }
                    //get the message, the warnings and errors
                    if ( this.status == "Error")
                    {
                        //messages
                        setMessages(xmlReport);
                    }
                }
            }
            else
            {
                this.setStatus("Error");
                Logger.logError(string.Format("Cannot get report from {0}",this.reportUrl));
            }
        }