mirror of
https://github.com/bitwarden/server
synced 2026-01-06 02:23:51 +00:00
Run formatting (#2230)
This commit is contained in:
@@ -3,27 +3,26 @@ using Bit.Core.Jobs;
|
||||
using Bit.Core.Settings;
|
||||
using Quartz;
|
||||
|
||||
namespace Bit.Admin.Jobs
|
||||
namespace Bit.Admin.Jobs;
|
||||
|
||||
public class AliveJob : BaseJob
|
||||
{
|
||||
public class AliveJob : BaseJob
|
||||
private readonly GlobalSettings _globalSettings;
|
||||
private HttpClient _httpClient = new HttpClient();
|
||||
|
||||
public AliveJob(
|
||||
GlobalSettings globalSettings,
|
||||
ILogger<AliveJob> logger)
|
||||
: base(logger)
|
||||
{
|
||||
private readonly GlobalSettings _globalSettings;
|
||||
private HttpClient _httpClient = new HttpClient();
|
||||
_globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
public AliveJob(
|
||||
GlobalSettings globalSettings,
|
||||
ILogger<AliveJob> logger)
|
||||
: base(logger)
|
||||
{
|
||||
_globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
protected async override Task ExecuteJobAsync(IJobExecutionContext context)
|
||||
{
|
||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Execute job task: Keep alive");
|
||||
var response = await _httpClient.GetAsync(_globalSettings.BaseServiceUri.Admin);
|
||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Finished job task: Keep alive, " +
|
||||
response.StatusCode);
|
||||
}
|
||||
protected async override Task ExecuteJobAsync(IJobExecutionContext context)
|
||||
{
|
||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Execute job task: Keep alive");
|
||||
var response = await _httpClient.GetAsync(_globalSettings.BaseServiceUri.Admin);
|
||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Finished job task: Keep alive, " +
|
||||
response.StatusCode);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user