mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-10-10 20:26:16 +00:00
code cleanup
This commit is contained in:
@@ -34,7 +34,7 @@ namespace MalwareMultiScan.Scanner
|
||||
services.AddConsul(context.Configuration);
|
||||
services.AddScanBackend(context.Configuration);
|
||||
|
||||
services.AddHangfire(context.Configuration,
|
||||
services.AddHangfire(context.Configuration,
|
||||
context.Configuration.GetValue<string>("BACKEND_ID"));
|
||||
|
||||
services.AddSingleton<IProcessRunner, ProcessRunner>();
|
||||
|
@@ -19,7 +19,7 @@ namespace MalwareMultiScan.Scanner.Services
|
||||
|
||||
private readonly IConsulClient _consulClient;
|
||||
private readonly AgentServiceRegistration _registration;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initialize consul hosted service.
|
||||
/// </summary>
|
||||
|
@@ -18,8 +18,8 @@ namespace MalwareMultiScan.Scanner.Services
|
||||
{
|
||||
private readonly IScanBackend _backend;
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly ILogger<ScanBackgroundJob> _logger;
|
||||
private readonly IBackgroundJobClient _jobClient;
|
||||
private readonly ILogger<ScanBackgroundJob> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize scan background job.
|
||||
@@ -90,7 +90,7 @@ namespace MalwareMultiScan.Scanner.Services
|
||||
$"Sending scan results with status {result.Status}");
|
||||
|
||||
_jobClient.Create<IScanResultJob>(
|
||||
x => x.Report(message.Id, _backend.Id, result),
|
||||
x => x.Report(message.Id, _backend.Id, result),
|
||||
new EnqueuedState("default"));
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
Reference in New Issue
Block a user