diff options
author | 2022-06-04 23:17:05 -0700 | |
---|---|---|
committer | 2022-06-06 17:08:34 -0700 | |
commit | 1cfe8602f159c0760bd684a419b1db3c631df115 (patch) | |
tree | e0ff6fdbef709ab0fdbdfc4dfa3d79817a547083 /README.md | |
parent | Add config path & output size args to NsJail class (diff) |
Accept NsJail arguments via the WSGI app (SnekAPI)
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -66,7 +66,9 @@ NsJail is configured through [`snekbox.cfg`]. It contains the exact values for t ### Gunicorn -[Gunicorn settings] can be found in [`gunicorn.conf.py`]. In the default configuration, the worker count and the bind address are likely the only things of any interest. Since it uses the default synchronous workers, the [worker count] effectively determines how many concurrent code evaluations can be performed. +[Gunicorn settings] can be found in [`gunicorn.conf.py`]. In the default configuration, the worker count, the bind address, and the WSGI app URI are likely the only things of any interest. Since it uses the default synchronous workers, the [worker count] effectively determines how many concurrent code evaluations can be performed. + +`wsgi_app` can be given arguments which are forwarded to the `NsJail` object. For example, `wsgi_app = "snekbox:SnekAPI(max_output_size=2_000_000, read_chunk_size=20_000)"`. ### Environment Variables @@ -125,3 +127,4 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md). [sentry release]: https://docs.sentry.io/platforms/python/configuration/releases/ [data source name]: https://docs.sentry.io/product/sentry-basics/dsn-explainer/ [GitHub Container Registry]: https://github.com/orgs/python-discord/packages/container/package/snekbox +[`NsJail`]: snekbox/nsjail.py |