推送规则,异常停机推送
This commit is contained in:
@@ -143,7 +143,7 @@ public class TimeTaskService : ITimeTaskService, IDynamicApiController, ITransie
|
||||
/// <param name="input">实体对象.</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("")]
|
||||
public async Task Create([FromBody] TimeTaskCrInput input)
|
||||
public async Task Create([FromBody] TimeTaskCrInput input,bool startNow = true)
|
||||
{
|
||||
if (await _repository.IsAnyAsync(x => (x.EnCode == input.enCode || x.FullName == input.fullName) && x.DeleteMark == null))
|
||||
throw Oops.Oh(ErrorCode.COM1004);
|
||||
@@ -162,7 +162,7 @@ public class TimeTaskService : ITimeTaskService, IDynamicApiController, ITransie
|
||||
_ = result ?? throw Oops.Oh(ErrorCode.COM1000);
|
||||
|
||||
// 添加到任务调度里
|
||||
AddTimerJob(result);
|
||||
AddTimerJob(result,startNow);
|
||||
//await AddJob(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user