zulip/zproject
Alex Vandiver 2a12fedcf1 tornado: Remove explicit tornado_processes setting; compute it.
We can compute the intended number of processes from the sharding
configuration.  In doing so, also validate that all of the ports are
contiguous.

This removes a discrepancy between `scripts/lib/sharding.py` and other
parts of the codebase about if merely having a `[tornado_sharding]`
section is sufficient to enable sharding.  Having behaviour which
changes merely based on if an empty section exists is surprising.

This does require that a (presumably empty) `9800` configuration line
exist, but making that default explicit is useful.

After this commit, configuring sharding can be done by adding to
`zulip.conf`:

```
[tornado_sharding]
9800 =              # default
9801 = other_realm
```

Followed by running `./scripts/refresh-sharding-and-restart`.
2020-09-18 15:13:40 -07:00
..
jinja2 python: Prefer kwargs form of dict.update. 2020-09-03 17:51:09 -07:00
__init__.py
backends.py auth: Remove redundant call to pad_method_dict(). 2020-09-17 13:41:41 -07:00
computed_settings.py tornado: Remove explicit tornado_processes setting; compute it. 2020-09-18 15:13:40 -07:00
config.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
configured_settings.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
default_settings.py tornado: Move default production port to 9800. 2020-09-18 15:13:40 -07:00
dev_settings.py tornado: Move default production port to 9800. 2020-09-18 15:13:40 -07:00
dev_urls.py middleware: Move locale-setting before domain checking. 2020-09-14 22:16:09 -07:00
email_backends.py dev_settings: Add EMAIL_PORT setting in zproject/dev_settings.py. 2020-08-04 11:03:40 -07:00
legacy_urls.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
prod_settings_template.py compose: Fix trailing slashes when creating Jitsi video meeting. 2020-08-26 12:01:11 -07:00
sentry.py sentry: Add additional context (client, fallback realm) to Sentry tags. 2020-09-11 16:43:29 -07:00
settings.py python: Add noqa comments for the specific star imports we allow. 2020-06-11 15:36:43 -07:00
terms.md.template docs: Capitalize Markdown consistently. 2020-08-11 10:23:06 -07:00
test_extra_settings.py tests: Remove three references to Casper in the comments. 2020-09-18 15:13:40 -07:00
test_settings.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
urls.py urls: Migrate re_path routes to path. 2020-09-12 14:29:26 -07:00
wsgi.py wsgi: Try to avoid extra django.setup calls. 2020-06-18 20:16:34 -07:00