fix: ajustes
This commit is contained in:
parent
0efb2ac75d
commit
bd0f910f1b
@ -20,6 +20,7 @@ namespace ChatApi.Services.Bot
|
|||||||
public Task<Result<string>> Call()
|
public Task<Result<string>> Call()
|
||||||
{
|
{
|
||||||
var httpClient =_httpClientFactory.CreateClient();
|
var httpClient =_httpClientFactory.CreateClient();
|
||||||
|
httpClient.Timeout = TimeSpan.FromSeconds(120);
|
||||||
var url = new Uri(new Uri(_configuration.Url), _configuration.Create);
|
var url = new Uri(new Uri(_configuration.Url), _configuration.Create);
|
||||||
var request = new HttpRequestMessage(HttpMethod.Post, url);
|
var request = new HttpRequestMessage(HttpMethod.Post, url);
|
||||||
request.Content = new StringContent(System.Text.Json.JsonSerializer.Serialize(_callRH), Encoding.UTF8, "application/json");
|
request.Content = new StringContent(System.Text.Json.JsonSerializer.Serialize(_callRH), Encoding.UTF8, "application/json");
|
||||||
@ -35,6 +36,7 @@ namespace ChatApi.Services.Bot
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
errorContent = response.Content.ReadAsStringAsync().Result;
|
errorContent = response.Content.ReadAsStringAsync().Result;
|
||||||
|
if (errorContent.ToLower().Contains("timeout")) errorContent = "O servidor do pipefy demorou um pouco para responder. Verifique se a solicitação foi aberta em seu email!";
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"DomvsDatabase": {
|
"DomvsDatabase": {
|
||||||
"ConnectionString": "mongodb://localhost:27017",
|
"ConnectionString": "mongodb+srv://rrcgoncalves:zSYxeWCcY7QlmAmF@cluster0.bmjlo.mongodb.net/?authMechanism=DEFAULT",
|
||||||
"DatabaseName": "DomvsSites",
|
"DatabaseName": "DomvsSites",
|
||||||
"SharepointCollectionName": "SharepointSite",
|
"SharepointCollectionName": "SharepointSite",
|
||||||
"ChatBotRHCollectionName": "ChatBotRHData",
|
"ChatBotRHCollectionName": "ChatBotRHData",
|
||||||
"ClassifierCollectionName": "ClassifierData"
|
"ClassifierCollectionName": "ClassifierData"
|
||||||
},
|
},
|
||||||
"ChatRHSettings": {
|
"ChatRHSettings": {
|
||||||
"Url": "https://localhost:7070/",
|
"Url": "http://localhost:8070/",
|
||||||
"Create": "/CallRH"
|
"Create": "/CallRH"
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"DomvsDatabase": {
|
"DomvsDatabase": {
|
||||||
"ConnectionString": "mongodb://localhost:27017",
|
"ConnectionString": "mongodb+srv://rrcgoncalves:zSYxeWCcY7QlmAmF@cluster0.bmjlo.mongodb.net/?authMechanism=DEFAULT",
|
||||||
"DatabaseName": "DomvsSites",
|
"DatabaseName": "DomvsSites",
|
||||||
"SharepointCollectionName": "SharepointSite",
|
"SharepointCollectionName": "SharepointSite",
|
||||||
"ChatBotRHCollectionName": "ChatBotRHData",
|
"ChatBotRHCollectionName": "ChatBotRHData",
|
||||||
@ -8,7 +8,7 @@
|
|||||||
"UserDataName": "UserData"
|
"UserDataName": "UserData"
|
||||||
},
|
},
|
||||||
"ChatRHSettings": {
|
"ChatRHSettings": {
|
||||||
"Url": "mongodb://localhost:27017",
|
"Url": "http://localhost:8070/",
|
||||||
"Create": "DomvsSites"
|
"Create": "DomvsSites"
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user