Skip to content

Commit cbef4a1

Browse files
myieyeclaude
andcommitted
Raise default Chorus local-op timeout so large projects can S/R
Chorus's 15-minute default timeout on local hg operations (e.g. the post-merge commit) is too short for very large projects, which then land on hold with a TimeoutException (#357). Default CHORUS_LOCAL_TIMEOUT_SECONDS to 3600 in environ, and pass it through both lfmergeqm launch scripts' sudo --preserve-env so a deployment can still override it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 92c8c96 commit cbef4a1

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

environ

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ export PATH="${BASE}/output/${BUILD}/net8.0:${BASE}/output/Mercurial:${PATH}"
99
# set HGRCPATH so that we ignore ~/.hgrc files which might have content that is
1010
# incompatible with our version of Mercurial
1111
export HGRCPATH=/etc/mercurial/hgrc
12+
13+
# Chorus's 15-min default timeout on local hg ops is too short for very large
14+
# projects, whose merge commits can exceed it and land the project on hold
15+
# (https://github.com/sillsdev/LfMerge/issues/357). Overridable per deployment via
16+
# CHORUS_LOCAL_TIMEOUT_SECONDS, passed through by the launch scripts' --preserve-env.
17+
export CHORUS_LOCAL_TIMEOUT_SECONDS=${CHORUS_LOCAL_TIMEOUT_SECONDS:-3600}

lfmergeqm-background.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
while :
77
do
8-
sudo -H --preserve-env=CHORUS_HG_EXE -u www-data lfmergeqm
8+
sudo -H --preserve-env=CHORUS_HG_EXE,CHORUS_LOCAL_TIMEOUT_SECONDS -u www-data lfmergeqm
99
sleep 86400
1010
done

lfmergeqm-looping.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ trap "exit" TERM
1010
# This is expected to run as the CMD, launched by the entry point.
1111

1212
while inotifywait -e close_write /var/lib/languageforge/lexicon/sendreceive/syncqueue; do
13-
sudo -H --preserve-env=CHORUS_HG_EXE -u www-data lfmergeqm
13+
sudo -H --preserve-env=CHORUS_HG_EXE,CHORUS_LOCAL_TIMEOUT_SECONDS -u www-data lfmergeqm
1414
# Run it again just to ensure that any initial clones that missed a race condition have a chance to get noticed
15-
sudo -H --preserve-env=CHORUS_HG_EXE -u www-data lfmergeqm
15+
sudo -H --preserve-env=CHORUS_HG_EXE,CHORUS_LOCAL_TIMEOUT_SECONDS -u www-data lfmergeqm
1616
done

0 commit comments

Comments
 (0)