Skip to content

Commit 6014e1f

Browse files
committed
Hardcode Updater Check to 6 hours
1 parent 1f8edc8 commit 6014e1f

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

AzzyBot-Next/Services/TimerServiceHost.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010

1111
namespace AzzyBot.Services;
1212

13-
public sealed class TimerServiceHost(AzzyBotSettingsRecord settings, DiscordBotService discordBotService, UpdaterService updaterService, ILogger<TimerServiceHost> logger) : IDisposable, IHostedService
13+
public sealed class TimerServiceHost(DiscordBotService discordBotService, UpdaterService updaterService, ILogger<TimerServiceHost> logger) : IDisposable, IHostedService
1414
{
1515
private readonly ILogger<TimerServiceHost> _logger = logger;
16-
private readonly AzzyBotSettingsRecord _settings = settings;
1716
private readonly DiscordBotService _discordBotService = discordBotService;
1817
private readonly UpdaterService _updaterService = updaterService;
1918
private readonly bool _isDev = AzzyStatsSoftware.GetBotEnvironment == Environments.Development;
@@ -53,7 +52,7 @@ private async void TimerTimeoutAsync(object? o)
5352
{
5453
DateTime now = DateTime.Now;
5554

56-
if (now - _lastBotUpdateCheck >= TimeSpan.FromDays(_settings.Updater.CheckInterval))
55+
if (now - _lastBotUpdateCheck >= TimeSpan.FromHours(5.98))
5756
{
5857
_logger.GlobalTimerCheckForUpdates();
5958
_lastBotUpdateCheck = now;

AzzyBot-Next/Settings/AzzyBotSettings-Docker.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"StreamUrl": ""
1414
},
1515
"Updater": {
16-
"CheckInterval": 1,
1716
"DisplayChangelog": true,
1817
"DisplayInstructions": true
1918
}

AzzyBot-Next/Settings/AzzyBotSettings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"StreamUrl": ""
1919
},
2020
"Updater": {
21-
"CheckInterval": 1,
2221
"DisplayChangelog": true,
2322
"DisplayInstructions": true
2423
}

AzzyBot-Next/Settings/AzzyBotSettingsRecord.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public sealed record DiscordStatus
3535

3636
public sealed record CoreUpdater
3737
{
38-
public required int CheckInterval { get; init; }
3938
public required bool DisplayChangelog { get; init; }
4039
public required bool DisplayInstructions { get; init; }
4140
}

0 commit comments

Comments
 (0)