|
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
@Slf4j
|
|
@@ -32,6 +33,8 @@ public class RequestLogService {
|
|
|
RequestLogPo requestLogPo = QUEUE.poll();
|
|
|
if (requestLogPo != null) {
|
|
|
iRequestLogService.save(requestLogPo);
|
|
|
+ } else {
|
|
|
+ TimeUnit.SECONDS.sleep(1);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|