Page MenuHomeSoftware Heritage

docker-dev: Refresh save code now statuses periodically
ClosedPublic

Authored by ardumont on Apr 29 2021, 10:51 AM.

Details

Summary

Without the following, as currently, the fresh new build from swh.web 0.0.302 onward,
new save code now requests are not updated anymore through the ui. The following makes
sure the status are updated periodically (15s).

This simply loops through indefinitely and periodically updates in db the save code now
request statuses. As installing a cron was deemed unnecessary [1]

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

[1] D5615

[2] D5616

Related to T3280

Test Plan

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

$ swh-doco exec swh-web /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 /bin/bash
root@8b20f39d055c:/# tail -f /tmp/refresh-statuses.log
...
Successfully updated 2 save request(s).
Thu Apr 29 08:48:01 UTC 2021
Nothing to do.
...

Diff Detail

Repository
rDENV Development environment
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21122
Build 32779: arc lint + arc unit

Event Timeline

anlambert added a subscriber: anlambert.

Looks good to me, thanks !

docker/services/swh-web/entrypoint.sh
48

Can you add an echo command above this to tell what it is doing ?

This revision is now accepted and ready to land.Apr 29 2021, 10:58 AM
docker/services/swh-web/entrypoint.sh
48

sure ;)

Add echo statement to explain what it's doing