Skip to content

Commit

Permalink
fix: fix nutripatrol deployment (#1333)
Browse files Browse the repository at this point in the history
+ add a log message in notify_image_flag method
  • Loading branch information
raphael0202 authored Apr 11, 2024
1 parent fa3dc0c commit 9e88ac2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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/[email protected]
id: wait-build
Expand Down
1 change: 1 addition & 0 deletions robotoff/notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9e88ac2

Please sign in to comment.