Skip to content

Commit 7be5f0c

Browse files
committed
refactor code
1 parent aadfd46 commit 7be5f0c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

platform-api/src/main/java/com/flow/platform/api/consumer/CmdCallbackQueueConsumer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.flow.platform.core.queue.PlatformQueue;
2424
import com.flow.platform.core.queue.PriorityMessage;
2525
import com.flow.platform.core.queue.QueueListener;
26+
import com.flow.platform.core.util.ThreadUtil;
2627
import com.flow.platform.util.Logger;
2728
import javax.annotation.PostConstruct;
2829
import org.springframework.beans.factory.annotation.Autowired;
@@ -80,10 +81,9 @@ private void detectRetryTimes(CmdCallbackQueueItem item) {
8081
}
8182

8283
private void reEnqueueJobCallback(CmdCallbackQueueItem item, long wait, int priority) {
83-
try {
84-
Thread.sleep(wait);
85-
} catch (Throwable ignore) {
86-
}
84+
85+
// sleep seconds
86+
ThreadUtil.sleep(wait);
8787

8888
// set retry times
8989
item.setRetryTimes(item.getRetryTimes() - 1);

0 commit comments

Comments
 (0)