TASK:模块化;

This commit is contained in:
shahaibo
2025-04-21 23:44:55 +08:00
parent 9b1881349f
commit cc8f2e0778

View File

@@ -382,7 +382,11 @@ public class GenerateConsumer {
log.info("task_id : {} start ", generateResult.get("task_id"));
if (generateResult.get("status").equals("SUCCESS")) {
String progress = generateResult.getString("progress");
String url = generateResult.getJSONArray("result").getString(0);
JSONArray result = generateResult.getJSONArray("result");
String url = null;
if (!StringUtils.isEmpty(result)) {
url = result.getString(0);
}
String taskId = generateResult.getString("task_id");
userLikeGroupService.relightBatch(taskId, url, progress);
} else {
@@ -506,9 +510,9 @@ public class GenerateConsumer {
processToProductImageBatchResult(msg, channel);
}
// @RabbitListener(queues = "#{rabbitMQProperties.queues.relightBatch}")
// @RabbitHandler
// public void getRelightBatchResult(Message msg, Channel channel) {
// processRelightBatchResult(msg, channel);
// }
@RabbitListener(queues = "#{rabbitMQProperties.queues.relightBatch}")
@RabbitHandler
public void getRelightBatchResult(Message msg, Channel channel) {
processRelightBatchResult(msg, channel);
}
}