#!/bin/bash
set +x

if [ -z "$VIRTUAL_ENV" ] && [ -d venv ]; then
  echo 'activate venv for celery'
  source ./venv/bin/activate
  nooutput=' >&- 2>&- <&- &'
fi

eval "celery -A run_celery.celery worker --loglevel=INFO --concurrency=1"$nooutput

#!/bin/bash
set +x

if [ -z "$VIRTUAL_ENV" ] && [ -d venv ]; then
  echo 'activate venv for celery'
  source ./venv/bin/activate
fi

celery -A run_celery.celery worker --loglevel=INFO --concurrency=4

--- 
+++ 
@@ -4,6 +4,7 @@
 if [ -z "$VIRTUAL_ENV" ] && [ -d venv ]; then
   echo 'activate venv for celery'
   source ./venv/bin/activate
+  nooutput=' >&- 2>&- <&- &'
 fi
 
-celery -A run_celery.celery worker --loglevel=INFO --concurrency=4
+eval "celery -A run_celery.celery worker --loglevel=INFO --concurrency=1"$nooutput
Stop celery output on remote server
