judge: set request.uid to optional

This commit is contained in:
undefined committed 2023-01-20 14:51:58 +08:00
1 parent 1a71693cd2
commit cf7682fb76
1 file changed
+2 -3
+2 -3
View File
@@ -31,7 +31,7 @@ export class JudgeTask {
lang: string; lang: string;
code: CopyInFile; code: CopyInFile;
input?: string; input?: string;
clean: (() => Promise<any>)[]; clean: (() => Promise<any>)[] = [];
data: FileInfo[]; data: FileInfo[];
folder: string; folder: string;
config: ParsedConfig; config: ParsedConfig;
@@ -65,12 +65,11 @@ export class JudgeTask {
HYDRO_DOMAIN: this.request.domainId.toString(), HYDRO_DOMAIN: this.request.domainId.toString(),
HYDRO_RECORD: this.rid, HYDRO_RECORD: this.rid,
HYDRO_LANG: this.lang, HYDRO_LANG: this.lang,
HYDRO_USER: this.request.uid.toString(), HYDRO_USER: (this.request.uid || 0).toString(),
HYDRO_CONTEST: tid, HYDRO_CONTEST: tid,
}; };
this.next = this.session.getNext(this); this.next = this.session.getNext(this);
this.end = this.session.getEnd(this); this.end = this.session.getEnd(this);
this.clean = [];
logger.info('Submission: %s/%s/%s', host, this.source, this.rid); logger.info('Submission: %s/%s/%s', host, this.source, this.rid);
await this.doSubmission(); await this.doSubmission();
} catch (e) { } catch (e) {