public bool Proccess(ProgramacaoTarefa programacaoTarefa) { var log = new Util.Log(ConfigurationManager.AppSettings["LogServico"]); RestDto <Log> response = null; try { _processBatch = new Repository.ApiClient.ProcessBatch(string.Empty, programacaoTarefa?.Tarefa.UrlAPI); response = _processBatch.Process(programacaoTarefa).Result; if (response.StatusCode == HttpStatusCode.Unauthorized) { this.RenovaToken(); this.Proccess(programacaoTarefa); } } catch (Exception ex) { log.Escreve_Log($"URL Chamada: { programacaoTarefa.Tarefa.UrlAPI}"); log.Escreve_Log(ex.Message); log.Escreve_Log(ex?.StackTrace); log.Escreve_Log(ex?.InnerException?.Message); } return(response.Success); }
public Task <RestDto <Dto.ApiClient.ApiBase.Log> > Process(ProgramacaoTarefa programacaoTarefa) { return(this._request.Post <Dto.ApiClient.ApiBase.Log, ProgramacaoTarefa>(programacaoTarefa, this._specificMethod)); }