mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-28 13:42:28 +02:00
Compare commits
7 Commits
164cd4fbb2
...
ef7c8be7b5
Author | SHA1 | Date | |
---|---|---|---|
|
ef7c8be7b5 | ||
|
d639617eba | ||
|
2125192f72 | ||
|
8d63801b00 | ||
|
e053fb7d96 | ||
|
ae7ed5c297 | ||
|
d624ba4427 |
@ -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,
|
||||
|
@ -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()
|
||||
```
|
||||
|
@ -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';
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user