mirror of
https://github.com/eliasstepanik/IonosDDNSUpdater.git
synced 2026-01-11 19:48:26 +00:00
Added waiting for Proper Update URL
This commit is contained in:
parent
62001cf83a
commit
bbd8676126
@ -8,6 +8,6 @@ public sealed class SpecterConsoleLoggerConfiguration
|
|||||||
|
|
||||||
public Dictionary<LogLevel, ConsoleColor> LogLevelToColorMap { get; set; } = new()
|
public Dictionary<LogLevel, ConsoleColor> LogLevelToColorMap { get; set; } = new()
|
||||||
{
|
{
|
||||||
[LogLevel.Information] = ConsoleColor.Green
|
/*[LogLevel.Information] = ConsoleColor.Green*/
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -16,7 +16,7 @@ namespace DDNSUpdater.Services;
|
|||||||
|
|
||||||
public class DDNSService : IDDNSService
|
public class DDNSService : IDDNSService
|
||||||
{
|
{
|
||||||
private List<string> UpdateURLs { get; set; }
|
private List<string>? UpdateURLs { get; set; }
|
||||||
public List<Domain> Domains { get; set; }
|
public List<Domain> Domains { get; set; }
|
||||||
|
|
||||||
private readonly ILogger<DDNSService> _logger;
|
private readonly ILogger<DDNSService> _logger;
|
||||||
@ -45,7 +45,11 @@ public class DDNSService : IDDNSService
|
|||||||
public async void Start()
|
public async void Start()
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Fetching UpdateURLs");
|
_logger.LogInformation("Fetching UpdateURLs");
|
||||||
|
while (UpdateURLs == null || UpdateURLs.Count == 0 )
|
||||||
|
{
|
||||||
UpdateURLs = await GetUpdateURLs();
|
UpdateURLs = await GetUpdateURLs();
|
||||||
|
}
|
||||||
|
|
||||||
_logger.LogInformation($"Fetched {UpdateURLs.Count} UpdateURLs");
|
_logger.LogInformation($"Fetched {UpdateURLs.Count} UpdateURLs");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user