修复版本文件缓存

This commit is contained in:
whyour 2022-11-05 15:23:17 +08:00
parent 049c73880b
commit fb4a87f5ce
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ if (!process.env.QL_DIR) {
process.env.QL_DIR = qlHomePath.replace(/\/$/g, ''); process.env.QL_DIR = qlHomePath.replace(/\/$/g, '');
} }
const lastVersionFile = `https://qn.whyour.cn/version.ts?v=${Date.now()}`; const lastVersionFile = `https://qn.whyour.cn/version.ts`;
const rootPath = process.env.QL_DIR as string; const rootPath = process.env.QL_DIR as string;
const envFound = dotenv.config({ path: path.join(rootPath, '.env') }); const envFound = dotenv.config({ path: path.join(rootPath, '.env') });

View File

@ -89,7 +89,7 @@ export default class SystemService {
let lastLog = ''; let lastLog = '';
try { try {
const lastVersionFileContent = await promiseExec( const lastVersionFileContent = await promiseExec(
`curl ${config.lastVersionFile}`, `curl ${config.lastVersionFile}?t=${Date.now()}`,
); );
lastVersion = lastVersionFileContent.match(versionRegx)![1]; lastVersion = lastVersionFileContent.match(versionRegx)![1];
lastLog = lastVersionFileContent.match(logRegx) lastLog = lastVersionFileContent.match(logRegx)