TASK:generate 修复逻辑Bug
This commit is contained in:
@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
public class MQConfig {
|
||||
|
||||
public static final String GENERATE_EXCHANGE_FANOUT = "generate-exchange";
|
||||
public static final String GENERATE_QUEUE = "generate-queue";
|
||||
public static final String GENERATE_QUEUE = "generate-queue-prod";
|
||||
|
||||
public MQConfig() {
|
||||
}
|
||||
|
||||
@@ -63,12 +63,12 @@ public class MQConsumer {
|
||||
// 2.2 将该消息从取消列表中删除
|
||||
// redisUtil.removeFromSet(cancelSetKey, uniqueId);
|
||||
} else {
|
||||
/*try {
|
||||
Thread.sleep(15000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}*/
|
||||
GenerateCollectionVO generateCollectionVO = generateService.generateThroughImageText(generateThroughImageTextDTO);
|
||||
// try {
|
||||
// Thread.sleep(15000);
|
||||
// } catch (InterruptedException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// 将消息从redis排队队列中删除,需保证被消费的消息存储到db之后再从redis删除
|
||||
redisUtil.removeFromZSet(consumptionOrderKey, uniqueId);
|
||||
if (!Objects.isNull(generateCollectionVO)) {
|
||||
@@ -100,8 +100,8 @@ public class MQConsumer {
|
||||
}
|
||||
long end = System.currentTimeMillis();
|
||||
|
||||
log.info(" task_id: " + uniqueId + "----------" + consumerName + " 执行时长:" + (end - start) + "毫秒");
|
||||
log.info("============end listening==========");
|
||||
log.info(" task_id: " + uniqueId + "----------" + consumerName + " 执行时长:" + (end - start) + "毫秒");
|
||||
log.info("=============end listening===========");
|
||||
}
|
||||
|
||||
@RabbitListener(queues = MQConfig.GENERATE_QUEUE)
|
||||
|
||||
Reference in New Issue
Block a user