From aae60aaca2e997b17ea82291422b86ea03145bbe Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sun, 4 Aug 2019 20:02:31 -0400 Subject: [PATCH] log admin job tasks --- src/Admin/Jobs/DatabaseExpiredGrantsJob.cs | 3 +++ src/Admin/Jobs/DatabaseRebuildlIndexesJob.cs | 3 +++ src/Admin/Jobs/DatabaseUpdateStatisticsJob.cs | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/Admin/Jobs/DatabaseExpiredGrantsJob.cs b/src/Admin/Jobs/DatabaseExpiredGrantsJob.cs index 099c6272bf..9d425feaff 100644 --- a/src/Admin/Jobs/DatabaseExpiredGrantsJob.cs +++ b/src/Admin/Jobs/DatabaseExpiredGrantsJob.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using Bit.Core; using Bit.Core.Jobs; using Bit.Core.Repositories; using Microsoft.Extensions.Logging; @@ -21,7 +22,9 @@ namespace Bit.Admin.Jobs protected async override Task ExecuteJobAsync(IJobExecutionContext context) { + _logger.LogInformation(Constants.BypassFiltersEventId, "Execute job task: DeleteExpiredGrantsAsync"); await _maintenanceRepository.DeleteExpiredGrantsAsync(); + _logger.LogInformation(Constants.BypassFiltersEventId, "Finished job task: DeleteExpiredGrantsAsync"); } } } diff --git a/src/Admin/Jobs/DatabaseRebuildlIndexesJob.cs b/src/Admin/Jobs/DatabaseRebuildlIndexesJob.cs index e6c0937e02..7267ee3c2c 100644 --- a/src/Admin/Jobs/DatabaseRebuildlIndexesJob.cs +++ b/src/Admin/Jobs/DatabaseRebuildlIndexesJob.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using Bit.Core; using Bit.Core.Jobs; using Bit.Core.Repositories; using Microsoft.Extensions.Logging; @@ -21,7 +22,9 @@ namespace Bit.Admin.Jobs protected async override Task ExecuteJobAsync(IJobExecutionContext context) { + _logger.LogInformation(Constants.BypassFiltersEventId, "Execute job task: RebuildIndexesAsync"); await _maintenanceRepository.RebuildIndexesAsync(); + _logger.LogInformation(Constants.BypassFiltersEventId, "Finished job task: RebuildIndexesAsync"); } } } diff --git a/src/Admin/Jobs/DatabaseUpdateStatisticsJob.cs b/src/Admin/Jobs/DatabaseUpdateStatisticsJob.cs index 66be8c4ba0..36410c7555 100644 --- a/src/Admin/Jobs/DatabaseUpdateStatisticsJob.cs +++ b/src/Admin/Jobs/DatabaseUpdateStatisticsJob.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using Bit.Core; using Bit.Core.Jobs; using Bit.Core.Repositories; using Microsoft.Extensions.Logging; @@ -21,8 +22,12 @@ namespace Bit.Admin.Jobs protected async override Task ExecuteJobAsync(IJobExecutionContext context) { + _logger.LogInformation(Constants.BypassFiltersEventId, "Execute job task: UpdateStatisticsAsync"); await _maintenanceRepository.UpdateStatisticsAsync(); + _logger.LogInformation(Constants.BypassFiltersEventId, "Finished job task: UpdateStatisticsAsync"); + _logger.LogInformation(Constants.BypassFiltersEventId, "Execute job task: DisableCipherAutoStatsAsync"); await _maintenanceRepository.DisableCipherAutoStatsAsync(); + _logger.LogInformation(Constants.BypassFiltersEventId, "Finished job task: DisableCipherAutoStatsAsync"); } } }