Merge pull request #2237 from mempool/ops/fix-liquid-assets-sync

[ops] Fix cron jobs to update liquid assets hourly
This commit is contained in:
wiz 2022-08-03 00:24:00 +00:00 committed by GitHub
commit 5147b0dbc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,10 @@
# start elements on reboot
@reboot sleep 60 ; /usr/local/bin/elementsd -chain=liquidv1 >/dev/null 2>&1
@reboot sleep 60 ; /usr/local/bin/elementsd -chain=liquidtestnet >/dev/null 2>&1
# start electrs on reboot
@reboot sleep 90 ; screen -dmS liquidv1 /elements/electrs/electrs-start-liquid
@reboot sleep 90 ; screen -dmS liquidtestnet /elements/electrs/electrs-start-liquidtestnet
6 * * * * cd $HOME/asset_registry_db && git pull origin master >/dev/null 2>&1
6 * * * * cd $HOME/asset_registry_testnet_db && git pull origin master >/dev/null 2>&1
# hourly asset update and electrs restart
6 * * * * cd $HOME/asset_registry_db && git pull --quiet origin master && cd $HOME/asset_registry_testnet_db && git pull --quiet origin master && killall electrs

View File

@ -1,3 +1,12 @@
# start on reboot
@reboot sleep 10 ; $HOME/start
37 13 * * * sleep 30 ; /mempool/mempool.space/backup >/dev/null 2>&1 &
# start cache warmer on reboot
@reboot sleep 180 ; /mempool/mempool/production/nginx-cache-warmer >/dev/null 2>&1 &
# daily backup
37 13 * * * sleep 30 ; /mempool/mempool.space/backup >/dev/null 2>&1 &
# hourly liquid asset update
6 * * * * cd $HOME/liquid/frontend && npm run sync-assets && rsync -av $HOME/liquid/frontend/dist/mempool/browser/en-US/resources/assets* $HOME/public_html/liquid/en-US/resources/ >/dev/null 2>&1