Compare commits

..

7 Commits

Author SHA1 Message Date
Ariel Rin
ef7c8be7b5 Merge branch 'fix/default-collation' into 'master'
Fix Different collations being used by docker and baremetal installations

See merge request allianceauth/allianceauth!1662
2024-11-17 01:57:59 +00:00
Ariel Rin
d639617eba Merge branch 'master' into 'master'
Celery documentation improvements

See merge request allianceauth/allianceauth!1663
2024-11-17 01:57:05 +00:00
r0kym
2125192f72 Fix typo in the long-running tasks example 2024-11-15 15:13:25 +01:00
r0kym
8d63801b00 Change logging imports and commands
Now uses `get_extension_logger` as is recommanded by https://allianceauth.readthedocs.io/en/v4.4.2/development/custom/logging.html
2024-11-15 15:12:03 +01:00
Matteo Ghia
e053fb7d96
also in baremetal docs 2024-11-09 12:45:59 +01:00
Matteo Ghia
ae7ed5c297
add default keyword required by mariadb 2024-11-09 12:45:31 +01:00
Matteo Ghia
d624ba4427
set default collation in startup script 2024-11-09 12:01:57 +01:00
3 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
CREATE USER 'aauth'@'%' IDENTIFIED BY 'authpass';
CREATE USER 'grafana'@'%' IDENTIFIED BY 'grafanapass';
CREATE DATABASE alliance_auth CHARACTER SET utf8mb4;
CREATE DATABASE alliance_auth CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON alliance_auth.* TO 'aauth'@'%';
GRANT
SELECT,

View File

@ -40,10 +40,10 @@ Please use the following approach to ensure your tasks are working properly with
Here is an example implementation of a task:
```python
import logging
from allianceauth.services.hooks import get_extension_logger
from celery import shared_task
logger = logging.getLogger(__name__)
logger = get_extension_logger(__name__)
@shared_task
@ -80,10 +80,10 @@ However, many long-running tasks consist of several smaller processes that need
Example implementation for a celery chain:
```python
import logging
from allianceauth.services.hooks import get_extension_logger
from celery import shared_task, chain
logger = logging.getLogger(__name__)
logger = get_extension_logger(__name__)
@shared_task
@ -96,7 +96,7 @@ def long_runner():
my_tasks = list()
for _ in range(10):
task_signature = example.si()
my_task.append(task_signature)
my_tasks.append(task_signature)
chain(my_tasks).delay()
```

View File

@ -246,7 +246,7 @@ and create them as follows, replacing `PASSWORD` with an actual secure password:
```sql
CREATE USER 'allianceserver'@'localhost' IDENTIFIED BY 'PASSWORD';
CREATE DATABASE alliance_auth CHARACTER SET utf8mb4;
CREATE DATABASE alliance_auth CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON alliance_auth . * TO 'allianceserver'@'localhost';
```