diff --git a/environ b/environ index 118ac7c1..7628edfd 100644 --- a/environ +++ b/environ @@ -9,3 +9,9 @@ export PATH="${BASE}/output/${BUILD}/net8.0:${BASE}/output/Mercurial:${PATH}" # set HGRCPATH so that we ignore ~/.hgrc files which might have content that is # incompatible with our version of Mercurial export HGRCPATH=/etc/mercurial/hgrc + +# Chorus's 15-min default timeout on local hg ops is too short for very large +# projects, whose merge commits can exceed it and land the project on hold +# (https://github.com/sillsdev/LfMerge/issues/357). Overridable per deployment via +# CHORUS_LOCAL_TIMEOUT_SECONDS, passed through by the launch scripts' --preserve-env. +export CHORUS_LOCAL_TIMEOUT_SECONDS=${CHORUS_LOCAL_TIMEOUT_SECONDS:-1800} diff --git a/lfmergeqm-background.sh b/lfmergeqm-background.sh index 55a72db8..7a2f4ad6 100644 --- a/lfmergeqm-background.sh +++ b/lfmergeqm-background.sh @@ -5,6 +5,6 @@ while : do - sudo -H --preserve-env=CHORUS_HG_EXE -u www-data lfmergeqm + sudo -H --preserve-env=CHORUS_HG_EXE,CHORUS_LOCAL_TIMEOUT_SECONDS -u www-data lfmergeqm sleep 86400 done diff --git a/lfmergeqm-looping.sh b/lfmergeqm-looping.sh index 790824c0..e530bfb7 100644 --- a/lfmergeqm-looping.sh +++ b/lfmergeqm-looping.sh @@ -10,7 +10,7 @@ trap "exit" TERM # This is expected to run as the CMD, launched by the entry point. while inotifywait -e close_write /var/lib/languageforge/lexicon/sendreceive/syncqueue; do - sudo -H --preserve-env=CHORUS_HG_EXE -u www-data lfmergeqm + sudo -H --preserve-env=CHORUS_HG_EXE,CHORUS_LOCAL_TIMEOUT_SECONDS -u www-data lfmergeqm # Run it again just to ensure that any initial clones that missed a race condition have a chance to get noticed - sudo -H --preserve-env=CHORUS_HG_EXE -u www-data lfmergeqm + sudo -H --preserve-env=CHORUS_HG_EXE,CHORUS_LOCAL_TIMEOUT_SECONDS -u www-data lfmergeqm done