Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tenant): 修复多租户定时任务执行结果为空时的异常 #193

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public void around(ProceedingJoinPoint joinPoint, TenantJob tenantJob) {
TenantUtils.execute(tenantId, () -> {
try {
Object result = joinPoint.proceed();
if(null == result){
XxlJobHelper.log(StrUtil.format("[多租户({}) 执行任务({}),结果为:null]",
tenantId, joinPoint.getSignature()));
//避免ConcurrentHashMap put空指针异常
result = "";
}
results.put(tenantId, StrUtil.toStringOrEmpty(result));
} catch (Throwable e) {
results.put(tenantId, ExceptionUtil.getRootCauseMessage(e));
Expand Down