From 1d61c6c6067e3dc39e94ba759fb4303353f955ce Mon Sep 17 00:00:00 2001 From: bethac07 Date: Thu, 22 Jan 2026 10:48:55 -0500 Subject: [PATCH 1/4] Don't exit if successful --- worker/run-worker.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/worker/run-worker.sh b/worker/run-worker.sh index fb0deee..84dd0ee 100644 --- a/worker/run-worker.sh +++ b/worker/run-worker.sh @@ -59,8 +59,7 @@ if [[ ${USE_PLUGINS} == 'True' ]]; then if [[ ${PLUGINS_COMMIT} != 'False' ]]; then echo "Checking out specific CellProfiler-plugins commit." cd CellProfiler-plugins - git checkout ${PLUGINS_COMMIT} || echo "No such commit, branch, or version; failing here." & exit 1 - cd .. + git checkout ${PLUGINS_COMMIT} & cd .. & echo "checkout successful" || (echo "No such commit, branch, or version; failing here." & exit 1) fi if [[ ${INSTALL_REQUIREMENTS} == 'True' ]]; then cd CellProfiler-plugins @@ -69,11 +68,11 @@ if [[ ${USE_PLUGINS} == 'True' ]]; then fi if [[ -d "active_plugins" ]]; then echo "Installing CellProfiler-plugins requirements." - pip install -e . ${REQUIREMENTS} || echo "Requirements install failed." & exit 1 + pip install -e . ${REQUIREMENTS} || (echo "Requirements install failed." & exit 1) cd .. else echo "Detected deprecated CellProfiler-plugins repo organization. Installing requirements." - pip install -r ${REQUIREMENTS} || echo "Requirements file not present or install failed; failing here." & exit 1 + pip install -r ${REQUIREMENTS} || (echo "Requirements file not present or install failed; failing here." & exit 1) cd .. fi fi From fb7b3336f4b4c04c56856202e4e376804f66fbc7 Mon Sep 17 00:00:00 2001 From: bethac07 Date: Thu, 22 Jan 2026 13:24:42 -0500 Subject: [PATCH 2/4] add sleep, reorg a bit --- worker/run-worker.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/worker/run-worker.sh b/worker/run-worker.sh index 84dd0ee..1226117 100644 --- a/worker/run-worker.sh +++ b/worker/run-worker.sh @@ -47,19 +47,13 @@ python3.8 instance-monitor.py & # 5. UPDATE AND/OR INSTALL PLUGINS if [[ ${USE_PLUGINS} == 'True' ]]; then if [[ ${UPDATE_PLUGINS} == 'True' ]]; then - echo "Updating CellProfiler-plugins." - cd CellProfiler-plugins - git fetch --all - git pull - cd .. + (echo "Updating CellProfiler-plugins." & cd CellProfiler-plugins & git fetch --all & git pull & cd ..) fi if [[ -z "$PLUGINS_COMMIT" ]]; then PLUGINS_COMMIT='False' fi if [[ ${PLUGINS_COMMIT} != 'False' ]]; then - echo "Checking out specific CellProfiler-plugins commit." - cd CellProfiler-plugins - git checkout ${PLUGINS_COMMIT} & cd .. & echo "checkout successful" || (echo "No such commit, branch, or version; failing here." & exit 1) + (echo "Checking out specific CellProfiler-plugins commit." & cd CellProfiler-plugins & git checkout ${PLUGINS_COMMIT} & cd .. & echo "checkout successful" & sleep 3) || (echo "No such commit, branch, or version; failing here." & exit 1) fi if [[ ${INSTALL_REQUIREMENTS} == 'True' ]]; then cd CellProfiler-plugins @@ -67,13 +61,9 @@ if [[ ${USE_PLUGINS} == 'True' ]]; then REQUIREMENTS = $REQUIREMENTS_FILE fi if [[ -d "active_plugins" ]]; then - echo "Installing CellProfiler-plugins requirements." - pip install -e . ${REQUIREMENTS} || (echo "Requirements install failed." & exit 1) - cd .. + (echo "Installing CellProfiler-plugins requirements." & pip install -e . ${REQUIREMENTS} & cd ..) || (echo "Requirements install failed." & exit 1) else - echo "Detected deprecated CellProfiler-plugins repo organization. Installing requirements." - pip install -r ${REQUIREMENTS} || (echo "Requirements file not present or install failed; failing here." & exit 1) - cd .. + (echo "Detected deprecated CellProfiler-plugins repo organization. Installing requirements." & pip install -r ${REQUIREMENTS} & cd ..) || (echo "Requirements file not present or install failed; failing here." & exit 1) fi fi fi From c89a343e8da280fbf91082cd48df08fbf7146d88 Mon Sep 17 00:00:00 2001 From: bethac07 Date: Thu, 22 Jan 2026 14:04:56 -0500 Subject: [PATCH 3/4] Double & --- worker/run-worker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worker/run-worker.sh b/worker/run-worker.sh index 1226117..283c584 100644 --- a/worker/run-worker.sh +++ b/worker/run-worker.sh @@ -47,13 +47,13 @@ python3.8 instance-monitor.py & # 5. UPDATE AND/OR INSTALL PLUGINS if [[ ${USE_PLUGINS} == 'True' ]]; then if [[ ${UPDATE_PLUGINS} == 'True' ]]; then - (echo "Updating CellProfiler-plugins." & cd CellProfiler-plugins & git fetch --all & git pull & cd ..) + (echo "Updating CellProfiler-plugins." & cd CellProfiler-plugins && git fetch --all && git pull && cd ..) fi if [[ -z "$PLUGINS_COMMIT" ]]; then PLUGINS_COMMIT='False' fi if [[ ${PLUGINS_COMMIT} != 'False' ]]; then - (echo "Checking out specific CellProfiler-plugins commit." & cd CellProfiler-plugins & git checkout ${PLUGINS_COMMIT} & cd .. & echo "checkout successful" & sleep 3) || (echo "No such commit, branch, or version; failing here." & exit 1) + (echo "Checking out specific CellProfiler-plugins commit." & cd CellProfiler-plugins && git checkout ${PLUGINS_COMMIT} && cd .. && echo "checkout successful" && sleep 3) || (echo "No such commit, branch, or version; failing here." & exit 1) fi if [[ ${INSTALL_REQUIREMENTS} == 'True' ]]; then cd CellProfiler-plugins @@ -61,7 +61,7 @@ if [[ ${USE_PLUGINS} == 'True' ]]; then REQUIREMENTS = $REQUIREMENTS_FILE fi if [[ -d "active_plugins" ]]; then - (echo "Installing CellProfiler-plugins requirements." & pip install -e . ${REQUIREMENTS} & cd ..) || (echo "Requirements install failed." & exit 1) + (echo "Installing CellProfiler-plugins requirements." & pip install -e . ${REQUIREMENTS} && cd ..) || (echo "Requirements install failed." & exit 1) else (echo "Detected deprecated CellProfiler-plugins repo organization. Installing requirements." & pip install -r ${REQUIREMENTS} & cd ..) || (echo "Requirements file not present or install failed; failing here." & exit 1) fi From 0c8a4c11288316197ec2dcd9ccf07b99ec0b7d31 Mon Sep 17 00:00:00 2001 From: bethac07 Date: Thu, 22 Jan 2026 14:28:58 -0500 Subject: [PATCH 4/4] One more --- worker/run-worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/run-worker.sh b/worker/run-worker.sh index 283c584..02471c3 100644 --- a/worker/run-worker.sh +++ b/worker/run-worker.sh @@ -63,7 +63,7 @@ if [[ ${USE_PLUGINS} == 'True' ]]; then if [[ -d "active_plugins" ]]; then (echo "Installing CellProfiler-plugins requirements." & pip install -e . ${REQUIREMENTS} && cd ..) || (echo "Requirements install failed." & exit 1) else - (echo "Detected deprecated CellProfiler-plugins repo organization. Installing requirements." & pip install -r ${REQUIREMENTS} & cd ..) || (echo "Requirements file not present or install failed; failing here." & exit 1) + (echo "Detected deprecated CellProfiler-plugins repo organization. Installing requirements." & pip install -r ${REQUIREMENTS} && cd ..) || (echo "Requirements file not present or install failed; failing here." & exit 1) fi fi fi