use of com.ibeiliao.deployment.admin.vo.deploy.CompileLogVO in project Corgi by kevinYin.
the class CompileLogController method getCompileLog.
@RequestMapping("getCompileLog")
@AllowAnonymous
@ResponseBody
public CompileLogVO getCompileLog(int historyId, int offset) {
CompileLogVO logVO = new CompileLogVO();
logVO.setOffset(offset);
String key = RedisLogKey.getModuleCompileKey(historyId);
Long count = redis.llen(key);
// logger.info("编译日志,总数:{}, 当前偏移量:{}", count, offset);
if (offset == count) {
return logVO;
}
if (count > 0) {
List<String> logs = redis.lrange(key, offset, count);
logVO.setLogs(logs);
logVO.setOffset(count.intValue());
return logVO;
}
return logVO;
}
Aggregations