Skip to content

Commit 98b0f9f

Browse files
committed
truncate output
1 parent a7c4049 commit 98b0f9f

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed

config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports = module.exports = {
66
PORT: process.env.AMQP_PORT || "5672"
77
},
88
SENTRY: {
9-
DSN: process.env.SENTRY_DSN || 'wont work'
9+
DSN: process.env.SENTRY_DSN
1010
},
1111
RUNBOX: {
1212
DIR: process.env.RUNBOX_DIR || "/tmp/runbox"

package-lock.json

+57
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tasks/run.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ async function execRun (job: RunJob): Promise<RunResult> {
2929
/bin/judge.sh -t ${job.timelimit || 5}
3030
`)
3131

32-
const stdout = cat(path.join(currentJobDir, 'run.stdout'))
32+
const stdout = exec(`
33+
head -c 65536 ${path.join(currentJobDir, 'run.stdout')}
34+
`)
3335

3436
// Check for compile_stderr if can't find a stdout file ; stdout can be ''
3537
const compile_stderr = cat(path.join(currentJobDir, 'compile.stderr')).toString()

0 commit comments

Comments
 (0)