File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ export class ProblemService {
160
160
161
161
async get (
162
162
id : bigint ,
163
- options ? : { userId : string } ,
163
+ options : { userId ? : string } = { } ,
164
164
) : Promise < ProblemService . get . Result > {
165
165
const now = new Date ( ) ;
166
166
let problem = await this . problems . findOneOrThrow ( {
@@ -169,7 +169,7 @@ export class ProblemService {
169
169
170
170
// Allow admin to get problem before start
171
171
if ( problem . startTime !== null && problem . startTime > now ) {
172
- if ( options ? .userId === undefined ) {
172
+ if ( options . userId === undefined ) {
173
173
throw new NotFoundException ( 'problem not found' ) ;
174
174
}
175
175
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { Artifacts } from '../problem/artifacts';
12
12
import { ProblemService } from '../problem/problem.service' ;
13
13
import { Language } from '../problem/template' ;
14
14
import { UserRepository } from '../user/user.repository' ;
15
+ import { bigint } from '../util/bigint' ;
15
16
import { tryTypia } from '../util/try-typia' ;
16
17
import { SubmitStatus } from './status' ;
17
18
import { Process , StartProcess , SubmitResult } from './submit-worker.service' ;
@@ -338,6 +339,7 @@ export class SubmitService {
338
339
exchange : 'submitWorker.loadBalancer' ,
339
340
routingKey : 'submitWorker.process' ,
340
341
payload : data satisfies Process . Data ,
342
+ timeout : 1000 * 60 * 5 , // 5 minutes
341
343
} ) ;
342
344
}
343
345
You can’t perform that action at this time.
0 commit comments