1
0
mirror of https://github.com/bitwarden/server synced 2025-12-26 21:23:39 +00:00

Revert filescoped (#2227)

* Revert "Add git blame entry (#2226)"

This reverts commit 239286737d.

* Revert "Turn on file scoped namespaces (#2225)"

This reverts commit 34fb4cca2a.
This commit is contained in:
Justin Baur
2022-08-29 15:53:48 -04:00
committed by GitHub
parent 239286737d
commit bae03feffe
1208 changed files with 74317 additions and 73126 deletions

View File

@@ -1,28 +1,29 @@
using Microsoft.Extensions.Logging;
using Quartz;
namespace Bit.Core.Jobs;
public abstract class BaseJob : IJob
namespace Bit.Core.Jobs
{
protected readonly ILogger _logger;
public BaseJob(ILogger logger)
public abstract class BaseJob : IJob
{
_logger = logger;
}
protected readonly ILogger _logger;
public async Task Execute(IJobExecutionContext context)
{
try
public BaseJob(ILogger logger)
{
await ExecuteJobAsync(context);
_logger = logger;
}
catch (Exception e)
{
_logger.LogError(2, e, "Error performing {0}.", GetType().Name);
}
}
protected abstract Task ExecuteJobAsync(IJobExecutionContext context);
public async Task Execute(IJobExecutionContext context)
{
try
{
await ExecuteJobAsync(context);
}
catch (Exception e)
{
_logger.LogError(2, e, "Error performing {0}.", GetType().Name);
}
}
protected abstract Task ExecuteJobAsync(IJobExecutionContext context);
}
}