# If the above command had a failing exit code
if [[ $? -ne 0 ]]; then
# FIXME #577 #681: add notification/warning system here
echo "elastic-build-index FAILED for \"$wiki_id\" at $endtimestamp"
# if the above command had a passing exit code (e.g. zero)
else
echo "elastic-build-index completed for \"$wiki_id\" at $endtimestamp"
fi
In the failing condition, it should either exit 1 immediately or it should sum the number of failing wikis, then exit ${SUM} at the end. This will cause meza deploy ... to die on the failing command. Perhaps we don't actually want it to die, however, and instead it should log the failure and continue. That way we could identify the problem faster. Bonus points for printing good log info on failure.
Additionally, the command preceding the block above (bash "{{ m_deploy }}/elastic-build-index.sh") may also not be exiting with a failure.
elastic-rebuild-all.sh
has a block like:In the failing condition, it should either
exit 1
immediately or it should sum the number of failing wikis, thenexit ${SUM}
at the end. This will causemeza deploy ...
to die on the failing command. Perhaps we don't actually want it to die, however, and instead it should log the failure and continue. That way we could identify the problem faster. Bonus points for printing good log info on failure.Additionally, the command preceding the block above (
bash "{{ m_deploy }}/elastic-build-index.sh"
) may also not be exiting with a failure.