main
黄海 1 year ago
parent e145e55dde
commit ab9a73de5f

@ -8,4 +8,4 @@ server_address = config.get('comfyui', 'server_address')
# 清理GPU缓存
info = getUse(server_address)
print(info)
# clear_cache(server_address)
clear_cache(server_address)

@ -557,4 +557,12 @@ public class HuiYaModel {
Record record = Db.findFirst(sql, image_md5);
return record;
}
/**
*
* @return
*/
public List<Record> wxGetCostTime() {
SqlPara sqlPara = Db.getSqlPara("HuiYa.wxGetCostTime");
}
}

@ -17,4 +17,20 @@
inner join t_hy_model as t3 on t2.model_id=t3.model_id
where t1.user_id=#para(user_id) order by id desc
#end
-- 计算模型耗时
#sql("wxGetCostTime")
WITH RankedTasks AS (
SELECT
model_id,
EXTRACT(SECOND FROM AGE(finish_time, begin_time)) AS seconds_difference,
ROW_NUMBER() OVER (PARTITION BY model_id ORDER BY task_id DESC) AS rn
FROM t_hy_task)
SELECT
model_id,
seconds_difference::integer
FROM
RankedTasks
WHERE
rn = 1 order by model_id;
#end
#end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Loading…
Cancel
Save