theo/machines/theo-server/deploy/theo-common/overnight.sh.mako

35 lines
843 B
Plaintext
Raw Normal View History

2020-09-19 18:55:17 -05:00
#!/bin/sh -e
<%text>############################################################</%text>
#
# overnight automation for Theo
#
<%text>############################################################</%text>
if [ "$1" = "--verbose" ]; then
VERBOSE='--verbose'
PROGRESS='--progress'
else
VERBOSE=
PROGRESS=
fi
cd ${envroot}
RATTAIL="bin/rattail --config=app/cron.conf $PROGRESS"
<%text>##############################</%text>
# sync data
<%text>##############################</%text>
% if env.theo_integrates_with == 'corepos':
# CORE-POS -> Theo
$RATTAIL --runas corepos import-corepos-api --delete
% elif env.theo_integrates_with == 'catapult':
# Catapult -> Theo
$RATTAIL --runas catapult import-catapult --delete
% endif
# make sure version data is correct
$RATTAIL --runas theo import-versions --delete --dry-run --warnings