Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bot/exts/utils/snekbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
EVAL_CATEGORIES = (Categories.help_available, Categories.help_in_use, Categories.voice)
EVAL_ROLES = (Roles.helpers, Roles.moderators, Roles.admins, Roles.owners, Roles.python_community, Roles.partners)

SIGKILL = 9
SIGTERM = 15

REEVAL_EMOJI = '\U0001f501' # :repeat:
REEVAL_TIMEOUT = 30
Expand Down Expand Up @@ -112,7 +112,7 @@ def get_results_message(results: dict) -> Tuple[str, str]:
if returncode is None:
msg = "Your eval job has failed"
error = stdout.strip()
elif returncode == 128 + SIGKILL:
elif returncode == 128 + SIGTERM:
msg = "Your eval job timed out or ran out of memory"
elif returncode == 255:
msg = "Your eval job has failed"
Expand Down
2 changes: 1 addition & 1 deletion tests/bot/exts/utils/test_snekbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_get_results_message(self):
"""Return error and message according to the eval result."""
cases = (
('ERROR', None, ('Your eval job has failed', 'ERROR')),
('', 128 + snekbox.SIGKILL, ('Your eval job timed out or ran out of memory', '')),
('', 128 + snekbox.SIGTERM, ('Your eval job timed out or ran out of memory', '')),
('', 255, ('Your eval job has failed', 'A fatal NsJail error occurred'))
)
for stdout, returncode, expected in cases:
Expand Down