Migrate to sphinx-design
This commit is contained in:
parent
31ee580449
commit
644ebce70a
367 changed files with 15740 additions and 14053 deletions
|
|
@ -16,42 +16,47 @@ Reducing the number of celery workers slows down the handling of asynchronous ta
|
|||
|
||||
Celery uses a `prefork` pool by default. This enables the server to process many tasks at the same time. You can switch to a `solo` pool which handles tasks one at a time. This reduces memory overhead but removes the ability to process tasks concurrently.
|
||||
|
||||
````{tabbed} Debian
|
||||
::::{tab-set}
|
||||
|
||||
:::{tab-item} Debian
|
||||
:sync: debian
|
||||
|
||||
1. Open your `funkwhale-worker` unit file in an editor.
|
||||
|
||||
```{code} bash
|
||||
sudo nano /etc/systemd/system/funkwhale-worker.service
|
||||
```
|
||||
```{code} bash
|
||||
sudo nano /etc/systemd/system/funkwhale-worker.service
|
||||
```
|
||||
|
||||
2. Add the `--pool=solo` flag to the `ExecStart` line of your unit file.
|
||||
|
||||
```{code} text
|
||||
ExecStart=/srv/funkwhale/.local/bin/poetry run celery -A --pool=solo funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY}
|
||||
```
|
||||
```{code} text
|
||||
ExecStart=/srv/funkwhale/.local/bin/poetry run celery -A --pool=solo funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY}
|
||||
```
|
||||
|
||||
3. Restart the Celery service.
|
||||
|
||||
```{code} bash
|
||||
sudo systemctl restart funkwhale-worker.service
|
||||
```
|
||||
```{code} bash
|
||||
sudo systemctl restart funkwhale-worker.service
|
||||
```
|
||||
|
||||
````
|
||||
:::
|
||||
|
||||
````{tabbed} Docker
|
||||
:::{tab-item} Docker
|
||||
:sync: docker
|
||||
|
||||
1. Add the `--pool=solo` flag to the `celerybeat` command in `docker-compose.yml`.
|
||||
|
||||
```{code} yaml
|
||||
celerybeat:
|
||||
…
|
||||
command: celery -A --pool=solo funkwhale_api.taskapp beat --pidfile= -l INFO
|
||||
```
|
||||
```{code} yaml
|
||||
celerybeat:
|
||||
…
|
||||
command: celery -A --pool=solo funkwhale_api.taskapp beat --pidfile= -l INFO
|
||||
```
|
||||
|
||||
2. Restart Celery.
|
||||
|
||||
```{code} bash
|
||||
docker-compose restart celerybeat
|
||||
```
|
||||
```{code} bash
|
||||
docker-compose restart celerybeat
|
||||
```
|
||||
|
||||
````
|
||||
:::
|
||||
::::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue