Skip to content

Allow context-specific resource limits to be provided

Compare
Choose a tag to compare
@kdmccormick kdmccormick released this 30 Oct 19:55
· 96 commits to master since this release
43e4fa5

Adds a limit_overrides_context argument to jail_code and safe_exec.

When provided, if settings.CODE_JAIL['limit_overrides'][limit_overrides_context] exists, then prefer those values to the ones in settings.CODE_JAIL['limits'].

This allows limits to be altered for specific contexts (for example, in the context of a certain course run, the permitted execution time could be increased).