From 1cfe8602f159c0760bd684a419b1db3c631df115 Mon Sep 17 00:00:00 2001 From: Mark <1515135+MarkKoz@users.noreply.github.com> Date: Sat, 4 Jun 2022 23:17:05 -0700 Subject: Accept NsJail arguments via the WSGI app (SnekAPI) --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2e2ee9c..533481e 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.2.3