Page MenuHomeSoftware Heritage

docker-dev: Refresh save code now statuses periodically

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



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

rDENV Development environment
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert added a subscriber: anlambert.

Looks good to me, thanks !


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

This revision is now accepted and ready to land.Thu, Apr 29, 10:58 AM

sure ;)

Add echo statement to explain what it's doing