Skip to content

Commit 0b964f3

Browse files
committed
fix(admin): Ignore tenant conditions when refreshing a job
- Add logic to ignore tenant conditions in the JobRefreshHandler - Prevents filtering errors due to tenant conditions when refreshing jobs
1 parent 6e874a7 commit 0b964f3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dinky-admin/src/main/java/org/dinky/job/handler/JobRefreshHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ public static boolean refreshJob(JobInfoDetail jobInfoDetail, boolean needSave)
194194

195195
isDone = !isTransition && isDone;
196196

197+
//we use jobInstanceId get info and update, ignore tenant ,Otherwise, it will cause tenant condition filtering errors
198+
TenantContextHolder.ignoreTenant();
199+
197200
if (!oldStatus.equals(jobInstance.getStatus()) || isDone || needSave) {
198201
log.debug("Dump JobInfo to database: {}->{}", jobInstance.getId(), jobInstance.getName());
199202
if (jobInstance.getStatus().equals(JobStatus.UNKNOWN.getValue())

0 commit comments

Comments
 (0)