You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "snac21 (via GitHub)" <gi...@apache.org> on 2025/12/30 14:24:52 UTC
[I] Skip tracing logs for disabled/shutdown job servers [shardingsphere-elasticjob]
snac21 opened a new issue, #2492:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2492
### Problem
Disabled/shutdown servers still record trace events to database.
### Proposed Solution
```java
@Override
public void postJobExecutionEvent(final JobExecutionEvent jobExecutionEvent) {
if (!isJobEnabled()) {
return;
}
jobTracingEventBus.post(jobExecutionEvent);
}
@Override
public void postJobStatusTraceEvent(final String taskId, final State state, final String message) {
if (!isJobEnabled()) {
return;
}
TaskContext taskContext = TaskContext.from(taskId);
jobTracingEventBus.post(new JobStatusTraceEvent(...));
}
public boolean isJobEnabled() {
if (JobRegistry.getInstance().isShutdown(jobName)) {
return false;
}
JobInstance jobInstance = JobRegistry.getInstance().getJobInstance(jobName);
return null != jobInstance && serverService.isEnableServer(jobInstance.getServerIp());
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Skip tracing logs for disabled/shutdown job servers [shardingsphere-elasticjob]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #2492:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2492#issuecomment-4398975625
Are you planning to submit a PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org