mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: also fix for daemon
This commit is contained in:
1 parent
8e0f7a2292
commit
4a34a91848
2 files changed
+2
-2
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.4.14",
|
"version": "2.4.15",
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export default class Hydro {
|
|||||||
async cacheOpen(domainId: string, pid: string, files: any[], next?) {
|
async cacheOpen(domainId: string, pid: string, files: any[], next?) {
|
||||||
const domainDir = path.join(getConfig('cache_dir'), this.config.host, domainId);
|
const domainDir = path.join(getConfig('cache_dir'), this.config.host, domainId);
|
||||||
const filePath = path.join(domainDir, pid); await fs.ensureDir(filePath);
|
const filePath = path.join(domainDir, pid); await fs.ensureDir(filePath);
|
||||||
if (!files.length) throw new SystemError('Problem data not found.');
|
if (!files?.length) throw new SystemError('Problem data not found.');
|
||||||
let etags: Record<string, string> = {};
|
let etags: Record<string, string> = {};
|
||||||
try {
|
try {
|
||||||
etags = JSON.parse(fs.readFileSync(path.join(filePath, 'etags')).toString());
|
etags = JSON.parse(fs.readFileSync(path.join(filePath, 'etags')).toString());
|
||||||
|
|||||||
Reference in new issue
Block a user