File tree Expand file tree Collapse file tree
test-celery-without-django Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [project ]
2+ name = " test-celery-without-django"
3+ version = " 0"
4+ requires-python = " >=3.12"
5+
6+ dependencies = [
7+ " celery>=5.4.0" ,
8+ " ipdb>=0.13.13" ,
9+ " redis>=5.2.1" ,
10+ " sentry-sdk[celery]" ,
11+ ]
12+
13+ [tool .uv .sources ]
14+ sentry-sdk = { path = " ../../sentry-python" , editable = true }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2-
3- # exit on first error
42set -euo pipefail
53
6- # Delete Celery beat schedule because because when switching versions
7- # a wrong schedule will cause strange errors
8- rm -f celerybeat-schedule
4+ if ! command -v uv & > /dev/null ; then
5+ curl -LsSf https://astral.sh/uv/install.sh | sh
6+ fi
97
10- # Delete redis database (empty the queue)
8+ rm -f celerybeat-schedule
119rm -rf dump.rdb
1210
13- # create and activate virtual environment
14- python -m venv .venv
15- source .venv/bin/activate
16-
17- # Install (or update) requirements
18- pip install -r requirements.txt
19-
20- # Start redis server
2111redis-server --daemonize yes
2212
23- # Run Celery and beat in the same process
24- celery -A tasks.app worker \
13+ uv run celery -A tasks.app worker \
2514 --concurrency=1 \
2615 --max-tasks-per-child=1
27-
28- # --loglevel=DEBUG \
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2+ set -euo pipefail
23
3- # exit on first error
4- set -xe
4+ if ! command -v uv & > /dev/null; then
5+ curl -LsSf https://astral.sh/uv/install.sh | sh
6+ fi
57
6- # create and activate virtual environment
7- python -m venv .venv
8- source .venv/bin/activate
9-
10- # Install (or update) requirements
11- python -m pip install -r requirements.txt
12-
13- python main.py
8+ uv run python main.py
You can’t perform that action at this time.
0 commit comments