docs: Add section on how-to run celery tasks manually
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>merge-requests/844/head
parent
74137ce8d8
commit
1c3e0a01f4
|
@ -80,6 +80,27 @@ In order to simulate an heartbeat of the stations 7, 23 and 42, the following co
|
|||
$ docker-compose exec web django-admin update_station_last_seen 7 23 42
|
||||
|
||||
|
||||
Manually run a celery tasks
|
||||
---------------------------
|
||||
|
||||
The following procedure can be used to manually run celery tasks in the local (docker-based) development environment:
|
||||
|
||||
- Setup local dev env (docker).
|
||||
- Start django shell
|
||||
```
|
||||
docker-compose exec web django-admin shell
|
||||
```
|
||||
- Run an asnyc task and check if it succeeded.
|
||||
```
|
||||
> from network.base.tasks import update_all_tle
|
||||
> task = update_all_tle.delay()
|
||||
> assert(task.ready())
|
||||
```
|
||||
- (optional) Check the celery log for the task output:
|
||||
```
|
||||
docker-compose logs celery
|
||||
```
|
||||
|
||||
Coding Style
|
||||
------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue