From 0532e9295e4319896466f1eda903a221d7e53cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Thu, 11 Apr 2024 10:19:59 +0200 Subject: [PATCH] fix: fix deployment + add a log message in notify_image_flag method --- .github/workflows/container-deploy.yml | 4 ++-- robotoff/notifier.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container-deploy.yml b/.github/workflows/container-deploy.yml index e75bd1cce5..9fd4bcdad6 100644 --- a/.github/workflows/container-deploy.yml +++ b/.github/workflows/container-deploy.yml @@ -30,7 +30,7 @@ jobs: echo "ROBOTOFF_TLD=net" >> $GITHUB_ENV echo "MONGO_URI=mongodb://10.1.0.200:27017" >> $GITHUB_ENV echo "INFLUXDB_HOST=10.1.0.200" >> $GITHUB_ENV - echo "IMAGE_MODERATION_SERVICE_URL=https://nutripatrol.openfoodfacts.net/api/v1/flags" + echo "IMAGE_MODERATION_SERVICE_URL=https://nutripatrol.openfoodfacts.net/api/v1/flags" >> $GITHUB_ENV - name: Set various variable for production deployment if: matrix.env == 'robotoff-org' run: | @@ -40,7 +40,7 @@ jobs: # use prod mongodb through stunnel echo "MONGO_URI=mongodb://10.1.0.113:27017" >> $GITHUB_ENV echo "INFLUXDB_HOST=10.1.0.201" >> $GITHUB_ENV - echo "IMAGE_MODERATION_SERVICE_URL=https://nutripatrol.openfoodfacts.org/api/v1/flags" + echo "IMAGE_MODERATION_SERVICE_URL=https://nutripatrol.openfoodfacts.org/api/v1/flags" >> $GITHUB_ENV - name: Wait for container build workflow uses: tomchv/wait-my-workflow@v1.1.0 id: wait-build diff --git a/robotoff/notifier.py b/robotoff/notifier.py index e758ed916d..68da5b6f5e 100644 --- a/robotoff/notifier.py +++ b/robotoff/notifier.py @@ -191,6 +191,7 @@ def notify_image_flag( "comment": json.dumps(prediction.data), } try: + logger.info("Notifying image %s to moderation service", image_url) http_session.post(self.service_url, json=data) except Exception: logger.exception(