1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-04 14:13:28 +01:00
bitwarden-server/src/Admin/Jobs/DatabaseRebuildlIndexesJob.cs

28 lines
749 B
C#
Raw Normal View History

using System;
using System.Threading.Tasks;
using Bit.Core.Jobs;
using Bit.Core.Repositories;
using Microsoft.Extensions.Logging;
using Quartz;
namespace Bit.Admin.Jobs
{
public class DatabaseRebuildlIndexesJob : BaseJob
{
private readonly IMaintenanceRepository _maintenanceRepository;
public DatabaseRebuildlIndexesJob(
IMaintenanceRepository maintenanceRepository,
2018-10-09 20:42:11 +02:00
ILogger<DatabaseRebuildlIndexesJob> logger)
: base(logger)
{
_maintenanceRepository = maintenanceRepository;
}
protected async override Task ExecuteJobAsync(IJobExecutionContext context)
{
await _maintenanceRepository.RebuildIndexesAsync();
}
}
}