fix(1.3.0-beta1): 兼容isRetry/retryStatus并存
This commit is contained in:
parent
84e1c54b23
commit
ed4161d9d9
@ -51,10 +51,23 @@ public class ClientCallbackContext {
|
||||
/**
|
||||
* 是否是重试流量
|
||||
*/
|
||||
private Boolean retryStatus = Boolean.FALSE;
|
||||
|
||||
private Boolean retryStatus;
|
||||
/**
|
||||
* 工作流上下文
|
||||
*/
|
||||
private String wfContext;
|
||||
|
||||
// 兼容isRetry/retryStatus并存
|
||||
@Deprecated
|
||||
public Boolean getRetryStatus() {
|
||||
return Boolean.TRUE.equals(retryStatus) || isRetry;
|
||||
}
|
||||
|
||||
// 兼容isRetry/retryStatus并存
|
||||
@Deprecated
|
||||
public void setRetryStatus(boolean value) {
|
||||
this.retryStatus = Boolean.valueOf(value);
|
||||
isRetry = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ import io.netty.handler.codec.http.HttpMethod;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import static com.aizuda.snailjob.common.core.constant.SystemConstants.HTTP_PATH.REPORT_JOB_DISPATCH_RESULT;
|
||||
|
||||
@ -51,10 +52,6 @@ public class ReportDispatchResultPostHttpRequestHandler extends PostHttpRequestH
|
||||
ClientCallbackHandler clientCallback = ClientCallbackFactory.getClientCallback(dispatchJobResultRequest.getTaskType());
|
||||
|
||||
ClientCallbackContext context = JobTaskConverter.INSTANCE.toClientCallbackContext(dispatchJobResultRequest);
|
||||
// 兼容过度版本
|
||||
if (Objects.isNull(context.getRetryStatus())) {
|
||||
context.setRetryStatus(context.isRetry());
|
||||
}
|
||||
context.setNamespaceId(headers.getAsString(HeadersEnum.NAMESPACE.getKey()));
|
||||
clientCallback.callback(context);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user