Skip to content

Commit

Permalink
Assign compile output to submission after compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanzdosilovic authored and Herman Zvonimir Došilović committed Feb 17, 2019
1 parent 8d2bc85 commit c3cd023
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ CMD rm -f tmp/pids/server.pid && \
rails s -b 0.0.0.0

LABEL maintainer="Herman Zvonimir Došilović, [email protected]"
LABEL version="1.1.4"
LABEL version="1.1.5"
6 changes: 4 additions & 2 deletions app/jobs/isolate_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ def write
def compile
return :success unless submission.language.compile_cmd

compile_output = `cd #{box} && timeout -s 15 -k 5s 10s #{submission.language.compile_cmd} 2>&1`
compile_output = `cd #{box} && timeout -s 15 -k 5s 10s #{submission.language.compile_cmd} 2>&1`.chomp
process_status = $?

submission.compile_output = compile_output unless compile_output.empty?
compile_output = nil if compile_output.empty?

submission.compile_output = compile_output

return :success if process_status.success?

Expand Down
2 changes: 1 addition & 1 deletion docs/api/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Source code is available on [GitHub](https://github.com/judge0/api).
Dummy client is available [here](/dummy-client.html) and can be used to try and test features of Judge0 API.

# Version
This document describes Judge0 API version [`v1.1.4`](https://github.com/judge0/api/tree/v1.1.4).
This document describes Judge0 API version [`v1.1.5`](https://github.com/judge0/api/tree/v1.1.5).

# Date and time formats
[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard is used.
Expand Down
4 changes: 2 additions & 2 deletions public/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 id="header-about">About <a class="permalink" href="#header-about" aria-hidde
Source code is available on <a href="https://github.com/judge0/api">GitHub</a>.</p>
<p>Dummy client is available <a href="/dummy-client.html">here</a> and can be used to try and test features of Judge0 API.</p>
<h1 id="header-version">Version <a class="permalink" href="#header-version" aria-hidden="true"></a></h1>
<p>This document describes Judge0 API version <a href="https://github.com/judge0/api/tree/v1.1.4"><code>v1.1.4</code></a>.</p>
<p>This document describes Judge0 API version <a href="https://github.com/judge0/api/tree/v1.1.5"><code>v1.1.5</code></a>.</p>
<h1 id="header-date-and-time-formats">Date and time formats <a class="permalink" href="#header-date-and-time-formats" aria-hidden="true"></a></h1>
<p><a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> standard is used.</p>
<p>Example: <code>2016-09-11T10:19:35Z</code></p>
Expand Down Expand Up @@ -1054,7 +1054,7 @@ <h4>Example URI</h4><div class="definition"><span class="method get">GET</span>&
"<span class="hljs-attribute">paused</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">failed</span>": <span class="hljs-value"><span class="hljs-number">0</span>
</span>}
]</code></pre><div style="height: 1px;"></div></div></div></div></div></section></div></div></div><p style="text-align: center;" class="text-muted">Generated by&nbsp;<a href="https://github.com/danielgtaylor/aglio" class="aglio">aglio</a>&nbsp;on 16 Feb 2019</p><script>/* eslint-env browser */
]</code></pre><div style="height: 1px;"></div></div></div></div></div></section></div></div></div><p style="text-align: center;" class="text-muted">Generated by&nbsp;<a href="https://github.com/danielgtaylor/aglio" class="aglio">aglio</a>&nbsp;on 17 Feb 2019</p><script>/* eslint-env browser */
/* eslint quotes: [2, "single"] */
'use strict';

Expand Down

0 comments on commit c3cd023

Please sign in to comment.