修复由于多租户定时任务方法返回 void 导致的执行 xxlJob 执行失败的问题
This commit is contained in:
parent
8aaa96c887
commit
72d2d81d6a
|
@ -46,7 +46,7 @@ public class TenantJobAspect {
|
||||||
TenantUtils.execute(tenantId, () -> {
|
TenantUtils.execute(tenantId, () -> {
|
||||||
try {
|
try {
|
||||||
Object result = joinPoint.proceed();
|
Object result = joinPoint.proceed();
|
||||||
results.put(tenantId, StrUtil.toStringOrNull(result));
|
results.put(tenantId, StrUtil.toStringOrEmpty(result));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
log.error("[execute][租户({}) 执行 Job 发生异常", tenantId, e);
|
log.error("[execute][租户({}) 执行 Job 发生异常", tenantId, e);
|
||||||
results.put(tenantId, ExceptionUtil.getRootCauseMessage(e));
|
results.put(tenantId, ExceptionUtil.getRootCauseMessage(e));
|
||||||
|
|
Loading…
Reference in New Issue