Add flag to debug logs (#912)

This commit is contained in:
Ildar Iskhakov 2022-11-29 11:16:42 +08:00 committed by GitHub
parent eb97797d43
commit 3198612c65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -75,7 +75,12 @@ By default everything runs inside Docker. If you would like to run the backend s
1. Create a Python 3.9 virtual environment using a method of your choosing (ex. [venv](https://docs.python.org/3.9/library/venv.html) or [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)). Make sure the virtualenv is "activated". 1. Create a Python 3.9 virtual environment using a method of your choosing (ex. [venv](https://docs.python.org/3.9/library/venv.html) or [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)). Make sure the virtualenv is "activated".
2. `postgres` is a dependency on some of our Python dependencies (notably `psycopg2` ([docs](https://www.psycopg.org/docs/install.html#prerequisites))). Please visit [here](https://www.postgresql.org/download/) for installation instructions. 2. `postgres` is a dependency on some of our Python dependencies (notably `psycopg2` ([docs](https://www.psycopg.org/docs/install.html#prerequisites))). Please visit [here](https://www.postgresql.org/download/) for installation instructions.
3. `make backend-bootstrap` - installs all backend dependencies 3. `make backend-bootstrap` - installs all backend dependencies
4. Modify your `.env.dev` by copying the contents of one of `.env.mysql.dev`, `.env.postgres.dev`, or `.env.sqlite.dev` into `.env.dev` (you should exclude the `GF_` prefixed environment variables). In most cases where you are running stateful services via `docker-compose` and backend services outside of docker you will simply need to change the database host to `localhost` (or in the case of `sqlite` update the file-path to your `sqlite` database file). 4. Modify your `.env.dev` by copying the contents of one of `.env.mysql.dev`, `.env.postgres.dev`,
or `.env.sqlite.dev` into `.env.dev` (you should exclude the `GF_` prefixed environment variables).
> In most cases where you are running stateful services via `docker-compose`
and backend services outside of docker you will simply need to change the database host to `localhost`
(or in the case of `sqlite` update the file-path to your `sqlite` database file). You will need to change
the broker host to `localhost` as well.
5. `make backend-migrate` - runs necessary database migrations 5. `make backend-migrate` - runs necessary database migrations
6. Open two separate shells and then run the following: 6. Open two separate shells and then run the following:

View file

@ -28,7 +28,6 @@ CELERY_ARGS=(
"--quiet" # --quite parameter removes pointless banner when celery starts "--quiet" # --quite parameter removes pointless banner when celery starts
"-A" "engine" "-A" "engine"
"worker" "worker"
"-l" "info"
"--concurrency=$CELERY_WORKER_CONCURRENCY" "--concurrency=$CELERY_WORKER_CONCURRENCY"
"--max-tasks-per-child=$CELERY_WORKER_MAX_TASKS_PER_CHILD" "--max-tasks-per-child=$CELERY_WORKER_MAX_TASKS_PER_CHILD"
"-Q" "$CELERY_WORKER_QUEUE" "-Q" "$CELERY_WORKER_QUEUE"
@ -45,5 +44,10 @@ fi
if [[ $CELERY_WORKER_WITHOUT_HEARTBEAT = True ]]; then if [[ $CELERY_WORKER_WITHOUT_HEARTBEAT = True ]]; then
CELERY_ARGS+=("--without-heartbeat") CELERY_ARGS+=("--without-heartbeat")
fi fi
if [[ $CELERY_WORKER_DEBUG_LOGS = True ]]; then
CELERY_ARGS+=("-l" "debug")
else
CELERY_ARGS+=("-l" "info")
fi
celery "${CELERY_ARGS[@]}" celery "${CELERY_ARGS[@]}"