tweak new builds monitor

This commit is contained in:
13xforever 2019-03-20 13:10:41 +05:00
parent 0cbd3b5699
commit 78c7472446
2 changed files with 5 additions and 4 deletions

View File

@ -61,7 +61,7 @@ namespace CompatBot.Commands
}
[Command("reanalyze")]
public async Task Reanalyze(CommandContext ctx, [Description("Full message link")]string messageLink)
public async Task Reanalyze(CommandContext ctx, [Description("Full message link")] string messageLink)
{
try
{
@ -71,8 +71,9 @@ namespace CompatBot.Commands
else
LogParsingHandler.EnqueueLogProcessing(ctx.Client, ctx.Channel, msg, ctx.Member, true);
}
catch
catch (Exception e)
{
Config.Log.Warn(e);
await ctx.ReactWithAsync(Config.Reactions.Failure).ConfigureAwait(false);
}
}

View File

@ -10,8 +10,8 @@ namespace CompatBot.EventHandlers
internal static class NewBuildsMonitor
{
private static readonly Regex BuildResult = new Regex("build (succeed|pass)ed", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
private static readonly TimeSpan PassiveCheckInterval = TimeSpan.FromHours(1);
private static readonly TimeSpan ActiveCheckInterval = TimeSpan.FromSeconds(5);
private static readonly TimeSpan PassiveCheckInterval = TimeSpan.FromMinutes(20);
private static readonly TimeSpan ActiveCheckInterval = TimeSpan.FromSeconds(20);
public static TimeSpan CheckInterval { get; private set; } = PassiveCheckInterval;
public static DateTime? RapidStart { get; private set; }