job异常处理
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Hangfire;
|
||||
using Hangfire.MemoryStorage.Database;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
@@ -221,6 +222,17 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
return Result.Success("http://localhost:19001/hangfire");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// job异常处理
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<Result> ErrorJob()
|
||||
{
|
||||
await _quartzInvoker.StartAsync("*/5 * * * * ?", "ErrorJob");
|
||||
return Result.Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 树形结构构建测试
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user