Skip to content

Commit

Permalink
feat: Update maintenance how to
Browse files Browse the repository at this point in the history
To add command to visualize tasks list
  • Loading branch information
alexgarel authored Feb 6, 2025
1 parent ce32996 commit 9249361
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion doc/how-to-guides/deployment/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Take the time to become a bit familiar with docker-compose if it's your first us

## Monitor

### See logs

To display the logs of the container, `docker compose logs [service-name]`.
(without service-name, you got all logs).

Expand All @@ -53,6 +55,19 @@ robotoff_worker_high_1 /bin/sh -c /docker-entrypo ... Up
...
```

### See number of tasks in queues

If you want to monitor how much job robotoff has to do (how behind it is),
you can run the `rq` command to get status:

```bash
docker compose run --rm --no-deps worker_1 rq info
```

This may help you understand why robotoff insight are not visible immediately on products.

See also [rq monitoring documentation](https://python-rq.org/docs/monitoring/) for more commands and informations.

## Database backup and restore

To backup the PostgreSQL database, run the following command:
Expand All @@ -68,4 +83,4 @@ You can restore it easily by copying the dump file inside the container and laun
```bash
docker cp -a robotoff_postgres.dump robotoff_postgres_1:/tmp/
docker exec -it robotoff_postgres_1 pg_restore -v -d postgres -U postgres -j 8 --if-exists /tmp/robotoff_postgres.dump
```
```

0 comments on commit 9249361

Please sign in to comment.