You've already forked FrameTour-BE
refactor(render): 优化渲染作业轮询配置
- 移除集成服务中的备用降级服务依赖 - 将轮询间隔从4秒调整为2秒以提高响应速度 - 将定时轮询频率从每3秒一次提升为每1秒一次 - 优化渲染作业状态检查的实时性
This commit is contained in:
@@ -21,7 +21,6 @@ import java.util.List;
|
|||||||
public class RenderJobIntegrationService {
|
public class RenderJobIntegrationService {
|
||||||
|
|
||||||
private final RenderJobV2Client renderJobV2Client;
|
private final RenderJobV2Client renderJobV2Client;
|
||||||
private final IntegrationFallbackService fallbackService;
|
|
||||||
|
|
||||||
private static final String SERVICE_NAME = "zt-render-worker";
|
private static final String SERVICE_NAME = "zt-render-worker";
|
||||||
|
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ public class RenderJobPollingService {
|
|||||||
private final MemberRelationRepository memberRelationRepository;
|
private final MemberRelationRepository memberRelationRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时轮询间隔:4秒
|
* 定时轮询间隔:2秒
|
||||||
*/
|
*/
|
||||||
private static final int POLL_INTERVAL_SECONDS = 4;
|
private static final int POLL_INTERVAL_SECONDS = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每次查询的最大记录数
|
* 每次查询的最大记录数
|
||||||
@@ -62,9 +62,9 @@ public class RenderJobPollingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时轮询渲染作业状态
|
* 定时轮询渲染作业状态
|
||||||
* 每3秒执行一次
|
* 每1秒执行一次
|
||||||
*/
|
*/
|
||||||
@Scheduled(fixedDelay = 3000)
|
@Scheduled(fixedDelay = 1000)
|
||||||
public void pollRenderJobs() {
|
public void pollRenderJobs() {
|
||||||
try {
|
try {
|
||||||
log.debug("[渲染轮询] 开始轮询渲染作业状态");
|
log.debug("[渲染轮询] 开始轮询渲染作业状态");
|
||||||
|
|||||||
Reference in New Issue
Block a user