Skip to content

Commit e21b464

Browse files
authored
build(tmp-celery-flush): Migrate from pip to uv (#55)
Replace requirements.txt with pyproject.toml and update run-celery.sh and start-task.sh to use uv for dependency management and execution. Fixes PY-2482
1 parent 895f179 commit e21b464

4 files changed

Lines changed: 22 additions & 24 deletions

File tree

tmp-celery-flush/pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[project]
2+
name = "tmp-celery-flush"
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 }

tmp-celery-flush/requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

tmp-celery-flush/run-celery.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
#!/usr/bin/env bash
2-
3-
# exit on first error
42
set -euo pipefail
53

6-
reset
7-
8-
# create and activate virtual environment
9-
python -m venv .venv
10-
source .venv/bin/activate
11-
12-
# Install (or update) requirements
13-
pip install -r requirements.txt
4+
if ! command -v uv &> /dev/null; then
5+
curl -LsSf https://astral.sh/uv/install.sh | sh
6+
fi
147

158
redis-server --daemonize yes
169

17-
celery -A tasks.app worker \
10+
uv run celery -A tasks.app worker \
1811
--loglevel=INFO \
1912
-c 1

tmp-celery-flush/start-task.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#!/usr/bin/env bash
2-
3-
# exit on first error
42
set -euo pipefail
53

6-
# create and activate virtual environment
7-
python -m venv .venv
8-
source .venv/bin/activate
4+
if ! command -v uv &> /dev/null; then
5+
curl -LsSf https://astral.sh/uv/install.sh | sh
6+
fi
97

10-
# Start task
11-
python -c 'import tasks; tasks.my_task.delay()'
8+
uv run python -c 'import tasks; tasks.my_task.delay()'

0 commit comments

Comments
 (0)