fix bug
This commit is contained in:
parent
c5c5443922
commit
a14720473f
@ -19,9 +19,9 @@ namespace FastGithub
|
|||||||
{
|
{
|
||||||
var assembly = typeof(DnsServiceCollectionExtensions).Assembly;
|
var assembly = typeof(DnsServiceCollectionExtensions).Assembly;
|
||||||
return services
|
return services
|
||||||
.AddGithubScanner(configuration)
|
|
||||||
.AddServiceAndOptions(assembly, configuration)
|
.AddServiceAndOptions(assembly, configuration)
|
||||||
.AddHostedService<DnsHostedService>();
|
.AddHostedService<DnsHostedService>()
|
||||||
|
.AddGithubScanner(configuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace FastGithub.Scanner
|
namespace FastGithub.Scanner
|
||||||
{
|
{
|
||||||
class GithubContextHashSet : HashSet<GithubContext>
|
sealed class GithubContextHashSet : HashSet<GithubContext>
|
||||||
{
|
{
|
||||||
public readonly object SyncRoot = new();
|
public readonly object SyncRoot = new();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
namespace FastGithub.Scanner
|
namespace FastGithub.Scanner
|
||||||
{
|
{
|
||||||
[Options("Github")]
|
[Options("Github")]
|
||||||
class GithubOptions
|
sealed class GithubOptions
|
||||||
{
|
{
|
||||||
public TimeSpan ScanAllInterval { get; set; } = TimeSpan.FromHours(12d);
|
public TimeSpan ScanAllInterval { get; set; } = TimeSpan.FromHours(12d);
|
||||||
|
|
||||||
|
|||||||
@ -73,9 +73,6 @@ namespace FastGithub.Scanner
|
|||||||
{
|
{
|
||||||
if (domain.Contains("github", StringComparison.OrdinalIgnoreCase))
|
if (domain.Contains("github", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return default;
|
|
||||||
}
|
|
||||||
|
|
||||||
lock (this.results.SyncRoot)
|
lock (this.results.SyncRoot)
|
||||||
{
|
{
|
||||||
return this.results
|
return this.results
|
||||||
@ -85,5 +82,8 @@ namespace FastGithub.Scanner
|
|||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace FastGithub.Scanner
|
namespace FastGithub.Scanner
|
||||||
{
|
{
|
||||||
class Meta
|
sealed class Meta
|
||||||
{
|
{
|
||||||
[JsonPropertyName("hooks")]
|
[JsonPropertyName("hooks")]
|
||||||
public string[] Hooks { get; set; } = Array.Empty<string>();
|
public string[] Hooks { get; set; } = Array.Empty<string>();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user