Me learning how to send HUP to gunicorn.
#!/usr/bin/env bash
set -euo pipefail
umask 002
reload() {
uv sync --all-extras --no-dev
uv run --no-sync python3 manage.py migrate
kill -HUP "$GUNICORN_PID"
}
trap reload HUP
# Initial sync and migrate
uv sync --all-extras --no-dev
uv run --no-sync python3 manage.py migrate
# Start gunicorn in background
uv run --no-sync gunicorn atheweb.wsgi &
GUNICORN_PID=$!
# Wait for gunicorn, restarting wait after signals
while kill -0 "$GUNICORN_PID" 2>/dev/null; do
wait "$GUNICORN_PID" || true
done
Somethings comes over me when I'm coding. It's like I can't stop until everything is written and polished and perfect. Or it'll just bug me to the point I can't work on anything else.
I think my mom is finally starting to remember that the puzzle hunt I go to every January is called "mystery hunt", not "treasure hunt".
Now that I have 3 Django projects instead of 1, I feel like I'm trying my
hardest to make sure the infrastructure is as similar as possible between them.
The ideal case is .pre-commit-config.yaml and Makefile can just be
copy-pasted between projects while ci.yml is project-agnostic:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
name: ✨ Full CI Audit Workflow
runs-on: ubuntu-latest
steps:
- name: 🧾 Checkout code
uses: actions/checkout@v6
- name: 🐍 Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: 📦 Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: 📥 Install dependencies
run: uv sync
- name: 🧼 Check formatting
run: make fmt
- name: 🔍 Run checks
run: make check
- name: 🧪 Run tests
run: make test
Still amazed by uv.
I'm completely unqualified to take about programming, but something about uv
just "feels right". I don't what I'm referring to, but it's a feeling I've had
ever since I started using it.