webapi + task
This commit is contained in:
1 parent
12e16e0c6c
commit
5252e20601
500 files changed
+281
-27576
No files matched your search
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using HHWMS.Web.Models;
|
||||
using Quartz;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Support.Quartz;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
//[QuartzRepeat(60,0,true)]
|
||||
[PersistJobDataAfterExecution]
|
||||
[DisallowConcurrentExecution]
|
||||
public class TestJob : WtmJob
|
||||
{
|
||||
public override Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
var _unitwork = new UnitWork(Wtm);
|
||||
|
||||
Wtm.DoLog("测试", ActionLogTypesEnum.Job, "TestJob");
|
||||
}
|
||||
catch(Exception ex) {
|
||||
Wtm.DoLog("测试", ActionLogTypesEnum.Job, "TestJob", request:"error", result:ex.Message);
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user