diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 51c69b69..7bfd827a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,12 +25,12 @@ exclude: | repos: # Code Upgrades - repo: https://github.com/asottile/pyupgrade - rev: v3.19.1 + rev: v3.20.0 hooks: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/adamchainz/django-upgrade - rev: 1.22.2 + rev: 1.25.0 hooks: - id: django-upgrade args: [--target-version=4.2] @@ -66,11 +66,11 @@ repos: - id: check-executables-have-shebangs - id: end-of-file-fixer - repo: https://github.com/editorconfig-checker/editorconfig-checker.python - rev: 3.2.0 + rev: 3.2.1 hooks: - id: editorconfig-checker - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.44.0 + rev: v0.45.0 hooks: - id: markdownlint language: node @@ -78,7 +78,7 @@ repos: - --disable=MD013 # Infrastructure - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.5.0 + rev: v2.6.0 hooks: - id: pyproject-fmt name: pyproject.toml formatter @@ -88,7 +88,7 @@ repos: additional_dependencies: - tox==4.24.1 # https://github.com/tox-dev/tox/releases/latest - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.23 + rev: v0.24.1 hooks: - id: validate-pyproject name: Validate pyproject.toml diff --git a/docs/development/tech_docu/celery.md b/docs/development/tech_docu/celery.md index a9b6c566..10ea0fa5 100644 --- a/docs/development/tech_docu/celery.md +++ b/docs/development/tech_docu/celery.md @@ -271,14 +271,14 @@ Every Alliance Auth installation will come with a couple of special celery relat Celery-once is a celery extension "that allows you to prevent multiple execution and queuing of celery tasks". What that means is that you can ensure that only one instance of a celery task runs at any given time. This can be useful, for example, if you do not want multiple instances of your task to talk to the same external service at the same time. -We use a custom backend for celery_once in Alliance Auth defined [here](https://gitlab.com/allianceauth/allianceauth/-/blob/master/allianceauth/services/tasks.py#L14) +We use a custom backend for celery_once in Alliance Auth defined [allianceauth.services.tasks.celery_once](https://gitlab.com/allianceauth/allianceauth/-/blob/master/allianceauth/services/tasks.py#L14) You can import it for use like so: ```python from allianceauth.services.tasks import QueueOnce ``` -An example of Alliance Auth's use within the `@sharedtask` decorator, can be seen [here](https://gitlab.com/allianceauth/allianceauth/-/blob/master/allianceauth/services/modules/discord/tasks.py#L62) in the discord module +An example of Alliance Auth's use within the `@sharedtask` decorator, can be seen [allianceauth.services.modules.discord.tasks](https://gitlab.com/allianceauth/allianceauth/-/blob/master/allianceauth/services/modules/discord/tasks.py#L62) in the discord module You can use it like so: ```python diff --git a/docs/installation-containerized/docker.md b/docs/installation-containerized/docker.md index 63391cc8..19bb74a3 100644 --- a/docs/installation-containerized/docker.md +++ b/docs/installation-containerized/docker.md @@ -17,7 +17,7 @@ If at any point `docker compose` does not work, but `docker-compose` does, you h 1. run `bash <(curl -s https://gitlab.com/allianceauth/allianceauth/-/raw/master/docker/scripts/download.sh)`. This will download all the files you need to install Alliance Auth and place them in a directory named `aa-docker`. Feel free to rename/move this folder. 1. run `./scripts/prepare-env.sh` to set up your environment 1. (optional) Change `PROTOCOL` to `http://` if not using SSL in `.env` -1. run `docker compose --env-file=.env up -d` (NOTE: if this command hangs, follow the instructions [here](https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged)) +1. run `docker compose --env-file=.env up -d` (NOTE: if this command hangs, follow the instructions [On This Tutorial](https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged)) 1. run `docker compose exec allianceauth_gunicorn bash` to open up a terminal inside an auth container 1. run `auth migrate` 1. run `auth collectstatic` diff --git a/docs/installation/gunicorn.md b/docs/installation/gunicorn.md index ec911f2b..5e37450a 100644 --- a/docs/installation/gunicorn.md +++ b/docs/installation/gunicorn.md @@ -69,7 +69,7 @@ Whatever you decide to use, remember it because we'll need it when configuring y ##### Number of workers -By default, Gunicorn will spawn only one worker. The number you set this to will depend on your own server environment, how many visitors you have etc. Gunicorn suggests `(2 x $num_cores) + 1` for the number of workers. So, for example, if you have 2 cores, you want 2 x 2 + 1 = 5 workers. See [here](https://docs.gunicorn.org/en/stable/design.html#how-many-workers) for the official discussion on this topic. +By default, Gunicorn will spawn only one worker. The number you set this to will depend on your own server environment, how many visitors you have etc. Gunicorn suggests `(2 x $num_cores) + 1` for the number of workers. So, for example, if you have 2 cores, you want 2 x 2 + 1 = 5 workers. See [How Many Workers](https://docs.gunicorn.org/en/stable/design.html#how-many-workers) for the official discussion on this topic. Change it by adding `--workers=5` to the command. diff --git a/docs/maintenance/tuning/web.md b/docs/maintenance/tuning/web.md index b4241bbf..d28c0ef8 100644 --- a/docs/maintenance/tuning/web.md +++ b/docs/maintenance/tuning/web.md @@ -6,7 +6,7 @@ The default installation will have 3 workers configured for Gunicorn. This will be fine on most systems, but if your system as more than one core than you might want to increase the number of workers to get better response times. Note that more workers will also need more RAM though. -The number you set this to will depend on your own server environment, how many visitors you have etc. Gunicorn suggests `(2 x $num_cores) + 1` for the number of workers. So for example, if you have 2 cores, you want 2 x 2 + 1 = 5 workers. See [here](https://docs.gunicorn.org/en/stable/design.html#how-many-workers) for the official discussion on this topic. +The number you set this to will depend on your own server environment, how many visitors you have etc. Gunicorn suggests `(2 x $num_cores) + 1` for the number of workers. So for example, if you have 2 cores, you want 2 x 2 + 1 = 5 workers. See [How Many Workers](https://docs.gunicorn.org/en/stable/design.html#how-many-workers) for the official discussion on this topic. ::::{tabs} :::{group-tab} Ubuntu 2204, 2404