mirror of
https://github.com/bitwarden/server.git
synced 2024-12-04 14:13:28 +01:00
28 lines
750 B
C#
28 lines
750 B
C#
|
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,
|
|||
|
ILogger<DatabaseUpdateStatisticsJob> logger)
|
|||
|
: base(logger)
|
|||
|
{
|
|||
|
_maintenanceRepository = maintenanceRepository;
|
|||
|
}
|
|||
|
|
|||
|
protected async override Task ExecuteJobAsync(IJobExecutionContext context)
|
|||
|
{
|
|||
|
await _maintenanceRepository.RebuildIndexesAsync();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|