From 5737ccd61db1b715507ce20a3e60145a6c4b6f88 Mon Sep 17 00:00:00 2001 From: Christophe Nouguier Date: Fri, 20 Nov 2020 12:17:15 +0100 Subject: [PATCH] feat: Integrate the OpenRadiation job (close #196) --- .env.default | 1 + deploy/openradiation.yml | 3 ++- docs/reference/environment.md | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.env.default b/.env.default index 766dc5a73..627601e8a 100644 --- a/.env.default +++ b/.env.default @@ -110,6 +110,7 @@ OPENAQ_DEBUG= # OpenRadiation OPENRADIATION_IMAGE=kalisio/k-openradiation OPENRADIATION_TAG=latest +OPENRADIATION_COMPLETE=true OPENRADIATION_CRON="0 0 * * * *" OPENRADIATION_DEBUG= diff --git a/deploy/openradiation.yml b/deploy/openradiation.yml index 0bac80917..e5ba2961c 100644 --- a/deploy/openradiation.yml +++ b/deploy/openradiation.yml @@ -1,10 +1,11 @@ version: '3.5' services: - openraiation: + openradiation: image: ${OPENRADIATION_IMAGE}:${OPENRADIATION_TAG} environment: - KEY=${OPENRADIATION_KEY} + - COMPLETE=${OPENRADIATION_COMPLETE} - DB_URL=${OPENRADIATION_DB_URL} - CRON=${OPENRADIATION_CRON} - DEBUG=${OPENRADIATION_DEBUG} diff --git a/docs/reference/environment.md b/docs/reference/environment.md index 610e7e7f0..25a26622a 100644 --- a/docs/reference/environment.md +++ b/docs/reference/environment.md @@ -222,7 +222,8 @@ The **MapProxy** service is preconfigured to run [Gunicorn](https://gunicorn.org | --- | --- | --- | | `OPENRADIATION_IMAGE` | The image to be used. | `kalisio/k-openaq` | | `OPENRADIATION_TAG` | The version to be used. | `1.0.0` | -| `OPENRADIATION_KEY` | The key to be able to consume the **OpenRadiation** API. | - | +| `OPENRADIATION_KEY` | The key to be able to consume the **OpenRadiation** API. The key must be asked to the **OpenRadiation** team. | - | +| `OPENRADIATION_COMPLETE` | An option to specify whether the job should request the complete list of fields. Check the [documentation](https://github.com/openradiation/openradiation-api#requesting-the-api) for more details. | `true` | | `OPENRADIATION_DB_URL` | The database URL where to write the data. | - | | `OPENRADIATION_CRON` | The cron expression used to run the job. | `0 0 * * * *` (every hour) | | `OPENRADIATION_DEBUG` | The namespaces to enable debug output. Set it to `krawler*` to enable full debug output. | `` |