run_forgefed_worker.sh 577 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. # SPDX-FileCopyrightText: 2020-2021 zPlus <zplus@peers.community>
  3. # SPDX-License-Identifier: CC0-1.0
  4. if [ -z "$PAGURE_PATH" ]; then
  5. echo "envvar PAGURE_PATH not set."
  6. exit
  7. fi
  8. if [ -z "$PAGURE_CONFIG" ]; then
  9. echo "envvar PAGURE_CONFIG not set."
  10. exit
  11. fi
  12. # Add Pagure to PYTHONPATH so that the tasks can import the Pagure config
  13. export PYTHONPATH=$PYTHONPATH:$PAGURE_PATH
  14. # Start forgefed worker
  15. celery worker --hostname=forgefed@%h \
  16. --loglevel=DEBUG \
  17. --app=forgefed.tasks \
  18. --queues=forgefed