Merge pull request #494 from dromara/fix-493

[ISSUE #493] remove AwareManager.execute for schedule executor
This commit is contained in:
yanhom 2024-10-22 23:18:33 +08:00 committed by GitHub
commit 961ba60456
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,34 +58,29 @@ public class ScheduledThreadPoolExecutorProxy extends ScheduledThreadPoolExecuto
@Override
public void execute(Runnable command) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
super.execute(command);
}
@Override
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
return super.schedule(command, delay, unit);
}
public <V> ScheduledFuture<V> schedule(Runnable command, V result, long delay, TimeUnit unit) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
return super.schedule(Executors.callable(command, result), delay, unit);
}
@Override
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
return super.scheduleAtFixedRate(command, initialDelay, period, unit);
}
@Override
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
return super.scheduleWithFixedDelay(command, initialDelay, delay, unit);
}