mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-19 23:35:04 +01:00
find and replace fixes, will introduce errors
This commit is contained in:
@@ -2,16 +2,15 @@
|
||||
|
||||
To reduce redundancy and help speed up development we encourage developers to utilize the following packages when developing apps for Alliance Auth.
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
|
||||
discord_client
|
||||
discord_service
|
||||
esi
|
||||
evelinks
|
||||
eveonline
|
||||
notifications
|
||||
testutils
|
||||
utils
|
||||
discord_client
|
||||
discord_service
|
||||
esi
|
||||
evelinks
|
||||
eveonline
|
||||
notifications
|
||||
testutils
|
||||
utils
|
||||
```
|
||||
|
||||
@@ -14,8 +14,7 @@ Alliance Auth is an online web application and as such the user expects fast and
|
||||
|
||||
As a rule of thumb we therefore recommend to use celery tasks for every process that can take longer than 1 sec to complete (also think about how long your process might take with large amounts of data).
|
||||
|
||||
```eval_rst
|
||||
.. note::
|
||||
:::{note}
|
||||
Another solution for dealing with long response time in particular when loading pages is to load parts of a page asynchronously, for example with AJAX.
|
||||
```
|
||||
|
||||
@@ -106,7 +105,7 @@ In this example we fist add 10 example tasks that need to run one after the othe
|
||||
|
||||
The list of task signatures is then converted to a chain and started asynchronously.
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. hint::
|
||||
In our example we use ``si()``, which is a shortcut for "immutable signatures" and prevents us from having to deal with result sharing between tasks.
|
||||
|
||||
@@ -137,7 +136,7 @@ CELERYBEAT_SCHEDULE['structures_update_all_structures'] = {
|
||||
|
||||
In Alliance Auth we have defined task priorities from 0 - 9 as follows:
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
====== ========= ===========
|
||||
Number Priority Description
|
||||
====== ========= ===========
|
||||
@@ -150,14 +149,14 @@ In Alliance Auth we have defined task priorities from 0 - 9 as follows:
|
||||
====== ========= ===========
|
||||
```
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. warning::
|
||||
Please make sure to use task priorities with care and especially do not use higher priorities without a good reason. All apps including Alliance Auth share the same task queues, so using higher task priorities excessively can potentially prevent more important tasks (of other apps) from completing on time.
|
||||
|
||||
You also want to make sure to run use lower priorities if you have a large amount of tasks or long running tasks, which are not super urgent. (e.g. the regular update of all Eve characters from ESI runs with priority 7)
|
||||
```
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. hint::
|
||||
If no priority is specified all tasks will be started with the default priority, which is 5.
|
||||
```
|
||||
@@ -170,7 +169,7 @@ Example for starting a task with priority 3:
|
||||
example.apply_async(priority=3)
|
||||
```
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. hint::
|
||||
For defining a priority to tasks you can not use the convenient shortcut ``delay()``, but instead need to start a task with ``apply_async()``, which also requires you to pass parameters to your task function differently. Please check out the `official docs <https://docs.celeryproject.org/en/stable/reference/celery.app.task.html#celery.app.task.Task.apply_async>`_ for details.
|
||||
```
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
|
||||
In this section you find topics useful for app developers.
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
|
||||
api/index
|
||||
celery
|
||||
core_models
|
||||
templatetags
|
||||
api/index
|
||||
celery
|
||||
core_models
|
||||
templatetags
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user