TASK:batch toProductImage;chatStream;
This commit is contained in:
@@ -375,16 +375,16 @@ public class GenerateConsumer {
|
|||||||
log.info("toProductImageBatch response : {}", generateResult);
|
log.info("toProductImageBatch response : {}", generateResult);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
log.info("tasks_id : {} start ", generateResult.get("task_id"));
|
log.info("tasks_id : {} start ", generateResult.get("tasks_id"));
|
||||||
if (!StringUtils.isEmpty(generateResult.getString("progress"))) {
|
if (!StringUtils.isEmpty(generateResult.getString("progress"))) {
|
||||||
String progress = generateResult.getString("progress");
|
String progress = generateResult.getString("progress");
|
||||||
JSONArray result = generateResult.getJSONArray("result");
|
JSONObject result = generateResult.getJSONObject("result_data");
|
||||||
String url = null;
|
String url = null;
|
||||||
if (!StringUtils.isEmpty(result)) {
|
if (!StringUtils.isEmpty(result)) {
|
||||||
url = result.getString(0);
|
url = result.getString("image_url");
|
||||||
|
String taskId = generateResult.getString("tasks_id");
|
||||||
|
userLikeGroupService.toProductBatch(taskId, url, progress);
|
||||||
}
|
}
|
||||||
String taskId = generateResult.getString("task_id");
|
|
||||||
userLikeGroupService.toProductBatch(taskId, url, progress);
|
|
||||||
} else {
|
} else {
|
||||||
// 修改redis中的数据状态为exception
|
// 修改redis中的数据状态为exception
|
||||||
String key = toProductImageResultKey + ":" + generateResult.get("task_id");
|
String key = toProductImageResultKey + ":" + generateResult.get("task_id");
|
||||||
|
|||||||
Reference in New Issue
Block a user