Commit 5ee8726b authored by Robert Rudman's avatar Robert Rudman

Don't log conflict errors, because we retry them anyway

parent 85f0b2fc
Pipeline #54499425 passed with stages
in 6 minutes and 25 seconds
......@@ -222,7 +222,7 @@ namespace Rodgort.Services.HostedServices
private async Task ProcessTracking(ChatClient chatClient, ChatEvent chatEvent, DateService dateService, CancellationToken cancellationToken, List<string> args)
{
var innerContext = _serviceProvider.GetRequiredService<RodgortContext>();
var allFollows = innerContext.BurnakiFollows.Where(bf => !bf.FollowEnded.HasValue);
var allFollows = innerContext.BurnakiFollows.Where(bf => !bf.FollowEnded.HasValue).ToList();
if (allFollows.Any())
{
var trackingMessage = $"The following tags are being tracked: {string.Join(", ", allFollows.Select(f => f.Tag).Distinct())}";
......@@ -239,7 +239,7 @@ namespace Rodgort.Services.HostedServices
var tag = args[0];
var innerContext = _serviceProvider.GetRequiredService<RodgortContext>();
var follows = innerContext.BurnakiFollows.Where(bf => !bf.FollowEnded.HasValue && bf.Tag == tag);
var follows = innerContext.BurnakiFollows.Where(bf => !bf.FollowEnded.HasValue && bf.Tag == tag).ToList();
if (follows.Any())
{
await chatClient.SendMessage(ChatSite.StackOverflow, ChatRooms.SO_BOTICS_WORKSHOP, $"@Gemmy stop tag {tag}");
......
......@@ -58,9 +58,7 @@ namespace StackExchangeChat
{"text", message},
{"fkey", fkey}
}));
LogResponseError(response);
var responseString = await response.Content.ReadAsStringAsync();
var matchesBackoff = backoffRegex.Match(responseString);
if (matchesBackoff.Success)
......@@ -75,6 +73,8 @@ namespace StackExchangeChat
return messageId;
}
LogResponseError(response);
var responsePayload = JsonConvert.DeserializeObject<JObject>(responseString);
return int.Parse(responsePayload["id"].ToString());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment