mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 09:46:30 +00:00
7807f5bc90
configure auto-scan folder and create hls files job WIP
28 lines
719 B
C#
28 lines
719 B
C#
using Microsoft.Extensions.Logging;
|
|
using Quartz;
|
|
|
|
namespace Azaion.Repository.Jobs
|
|
{
|
|
[DisallowConcurrentExecution]
|
|
public abstract class BaseJob(ILogger<BaseJob> logger) : IJob
|
|
{
|
|
protected abstract Task ExecuteInner(IJobExecutionContext context);
|
|
|
|
public async Task Execute(IJobExecutionContext context)
|
|
{
|
|
logger.LogDebug($"Start {GetType().Name}");
|
|
|
|
try
|
|
{
|
|
await ExecuteInner(context);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
logger.LogError(e, e.Message);
|
|
throw;
|
|
}
|
|
|
|
logger.LogDebug($"{GetType().Name} Finished");
|
|
}
|
|
}
|
|
} |