Skip to content

docker: Install save code now refresh status cron

Without the cron, as currently, the fresh new build with web 0.0.302, new save code now requests are not updated anymore through the ui. The following makes sure the status are updated periodically.

This is the equivalent of what's been deployed in production [2]

Related to T3280

Test Plan

docker-compose up, do some save code now requests and amazingly check the status gets updated when browsing through pagination:

swh-doco exec swh-web-cron /bin/bash
+ cd /home/tony/work/inria/repo/swh/swh-environment/docker
+ docker-compose -f docker-compose.yml -f docker-compose.override.yml exec swh-web-cron /bin/bash
root@8b20f39d055c:/# tail -f /var/log/refresh-statuses.log
+ SWH_CONFIG_FILENAME=/web.yml
+ /srv/softwareheritage/venv/bin/django-admin refresh_savecodenow_statuses
/srv/softwareheritage/venv/lib/python3.7/site-packages/jose/backends/cryptography_backend.py:18: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes, int_to_bytes
[27/Apr/2021 14:58:04] [DEBUG] urllib3.connectionpool._new_conn:231 - Starting new HTTP connection (1): swh-scheduler:5008
[27/Apr/2021 14:58:04] [DEBUG] urllib3.connectionpool._make_request:461 - http://swh-scheduler:5008 "POST /task/get HTTP/1.1" 200 497
[27/Apr/2021 14:58:04] [DEBUG] urllib3.connectionpool._make_request:461 - http://swh-scheduler:5008 "POST /task_run/get HTTP/1.1" 200 281
[27/Apr/2021 14:58:04] [DEBUG] urllib3.connectionpool._new_conn:231 - Starting new HTTP connection (1): swh-storage:5002
[27/Apr/2021 14:58:04] [DEBUG] urllib3.connectionpool._make_request:461 - http://swh-storage:5002 "POST /origin/get HTTP/1.1" 200 3
Successfully updated 2 save request(s).

Migrated from D5615 (view on Phabricator)

Merge request reports