mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: bug #324
* fix: bug #324 Fail to cancel delay job instance by id via API * style: correct log * style: update log Co-authored-by: Echo009 <ech0.extreme@foxmail.com>
This commit is contained in:
parent
e094c22952
commit
75c88c32ed
@ -191,8 +191,8 @@ public class InstanceService {
|
||||
* @param instanceId 任务实例
|
||||
*/
|
||||
@DesignateServer
|
||||
public void cancelInstance(Long instanceId) {
|
||||
log.info("[Instance-{}] try to cancel the instance.", instanceId);
|
||||
public void cancelInstance(Long appId, Long instanceId) {
|
||||
log.info("[Instance-{}] try to cancel the instance with appId {}.", instanceId, appId);
|
||||
|
||||
try {
|
||||
InstanceInfoDO instanceInfo = fetchInstanceInfo(instanceId);
|
||||
|
@ -126,7 +126,7 @@ public class OpenAPIController {
|
||||
@PostMapping(OpenAPIConstant.CANCEL_INSTANCE)
|
||||
public ResultDTO<Void> cancelInstance(Long instanceId, Long appId) {
|
||||
checkInstanceIdValid(instanceId, appId);
|
||||
instanceService.cancelInstance(instanceId);
|
||||
instanceService.cancelInstance(appId, instanceId);
|
||||
return ResultDTO.success(null);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user