Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test-celery-max-tasks-per-child/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "test-celery-max-tasks-per-child"
version = "0"
requires-python = ">=3.12"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python version constraint mismatch

Medium Severity

The pyproject.toml specifies requires-python = ">=3.12", but the .python-version file in this directory is pinned to 3.10. This conflict can cause uv sync or uv run to fail or select an incorrect Python interpreter, unlike other similar projects where these versions are aligned.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c322f0a. Configure here.


dependencies = [
"celery>=5.4.0",
"ipdb>=0.13.13",
"redis>=5.2.1",
"sentry-sdk[celery]",
]

[tool.uv.sources]
sentry-sdk = { path = "../../sentry-python", editable = true }
7 changes: 0 additions & 7 deletions test-celery-max-tasks-per-child/requirements.txt

This file was deleted.

19 changes: 5 additions & 14 deletions test-celery-max-tasks-per-child/run-celery.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
#!/usr/bin/env bash

# exit on first error
set -euo pipefail

reset

# create and activate virtual environment
python -m venv .venv
source .venv/bin/activate

# Install (or update) requirements
pip install -r requirements.txt

reset
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

redis-server --daemonize yes

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

celery -A tasks.app worker \
uv run celery -A tasks.app worker \
--loglevel=DEBUG \
-B \
-c 1 \
--max-tasks-per-child 10000 # > output.txt 2> error.txt
--max-tasks-per-child 10000
17 changes: 5 additions & 12 deletions test-celery-max-tasks-per-child/run.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail

# exit on first error
set -xe
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

reset

# create and activate virtual environment
python -m venv .venv

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv missing after install

Medium Severity

When uv is installed via curl | sh, the installer doesn't update the current shell's PATH. This causes the immediate uv run command to fail with "command not found" in the same script execution.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c322f0a. Configure here.

source .venv/bin/activate

# Install (or update) requirements
python -m pip install -r requirements.txt

python main.py
uv run python main.py
Loading