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
18 changes: 18 additions & 0 deletions test-django-celery-beat-timezone/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[project]
name = "test-django-celery-beat-timezone"
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 requirement conflicts pyenv pin

Medium Severity

The new requires-python = ">=3.12" conflicts with the existing .python-version file in the same project, which still pins 3.11. After this change, uv run in run.sh and run-celery.sh can refuse to resolve the environment when pyenv (or similar) selects 3.11 from that file.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 66782f6. Configure here.


dependencies = [
"channels[daphne]>=4.2.0",
"django==4.2",
"django-celery-beat>=2.7.0",
"django-debug-toolbar>=5.0.1",
"ipdb>=0.13.13",
"psycopg>=3.2.6",
"redis>=5.2.1",
"sentry-sdk[django,celery]",
]

[tool.uv.sources]
sentry-sdk = { path = "../../sentry-python", editable = true }
14 changes: 0 additions & 14 deletions test-django-celery-beat-timezone/requirements.txt

This file was deleted.

15 changes: 5 additions & 10 deletions test-django-celery-beat-timezone/run-celery.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
#!/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
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

redis-server --daemonize yes

cd mysite

celery -A mysite.tasks.app worker \
uv run celery -A mysite.tasks.app worker \
--loglevel=DEBUG \
-B \
-c 1 \
--scheduler django_celery_beat.schedulers:DatabaseScheduler
--scheduler django_celery_beat.schedulers:DatabaseScheduler
21 changes: 6 additions & 15 deletions test-django-celery-beat-timezone/run.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail

# exit on first error
set -xe

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

# Install (or update) requirements
python -m pip install -r requirements.txt
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

cd mysite

# run migrations
./manage.py migrate
uv run ./manage.py migrate

# Run Django application on localhost:8000
./manage.py runserver 0.0.0.0:8000
#gunicorn movie_search.project.asgi:application -k uvicorn.workers.UvicornWorker
# daphne -b 0.0.0.0 -p 8000 mysite.asgi:application
uv run ./manage.py runserver 0.0.0.0:8000
Loading