duration of scan

This commit is contained in:
Volodymyr Smirnov
2020-10-27 21:40:34 +02:00
parent 2a933ebe6b
commit b3fc7ff2d9
9 changed files with 40 additions and 4 deletions

View File

@@ -68,10 +68,11 @@ namespace MalwareMultiScan.Api.Services
/// </summary>
/// <param name="resultId">Result id.</param>
/// <param name="backendId">Backend id.</param>
/// <param name="duration">Duration of scan.</param>
/// <param name="completed">If the scan has been completed.</param>
/// <param name="succeeded">If the scan has been succeeded.</param>
/// <param name="threats">List of found threats.</param>
public async Task UpdateScanResultForBackend(string resultId, string backendId,
public async Task UpdateScanResultForBackend(string resultId, string backendId, long duration,
bool completed = false, bool succeeded = false, string[] threats = null)
{
await _collection.UpdateOneAsync(
@@ -80,6 +81,7 @@ namespace MalwareMultiScan.Api.Services
{
Completed = completed,
Succeeded = succeeded,
Duration = duration,
Threats = threats ?? new string[] { }
}));
}