Skip to content

Commit

Permalink
js: fix rlimit_as for node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
raylu committed Sep 2, 2024
1 parent fe28f81 commit 0240471
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def nodejs(cmd):
args = ['../nsjail/nsjail', '--use_cgroupv2', '--cgroupv2_mount', '/sys/fs/cgroup/NSJAIL', '-Mo',
'--rlimit_as', '700', '--chroot', chroot_dir,
'--rlimit_as', '1000', '--chroot', chroot_dir,
'-R/usr', '-R/lib', '-R/lib64', '--user', 'nobody', '--group', 'nogroup',
'--time_limit', '2', '--disable_proc', '--iface_no_lo',
'--cgroup_mem_max', str(50 * MB), '--cgroup_pids_max', '10', '--quiet', '--',
Expand Down
6 changes: 3 additions & 3 deletions mock_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
import requests

import config
import poe
import code_eval

class MockCmd:

Check failure on line 11 in mock_cmd.py

View workflow job for this annotation

GitHub Actions / test

Ruff (I001)

mock_cmd.py:3:1: I001 Import block is un-sorted or un-formatted
def __init__(self):
if len(sys.argv) == 2:
self.args = sys.argv[1]
else:
self.args = ''
self.sender = {'username': 'testname', 'id': '1'}
self.sender = {'username': 'testname', 'pretty_name': 'testname', 'id': '1'}
self.channel_id = '1'
self.bot = MockBot()

Expand Down Expand Up @@ -52,4 +52,4 @@ def __init__(self):
'cats': {'position': 2, 'name': 'cats', 'color': 13369480, 'id': '2222'},
}

poe.price(MockCmd())
code_eval.nodejs(MockCmd())

0 comments on commit 0240471

Please sign in to comment.