sync_workspace (user-triggered) and the reconciler's sync_bidirectional_sync could run concurrently for the same project, and store_upload's read-then- write on a changed path meant two racing imports each wrote their own blob while only one ever got referenced - the loser leaked forever. Combined with no build-artifact exclusion, an actively-compiling workspace hit this constantly and leaked 5.9M orphan blobs (~96GB) in production before it was caught. Closes it at the root: api._sync_dir_bidirectional_locked serializes both call sites per-project (non-blocking - a project already mid-sync is simply skipped until the next tick), and IMPORT_SKIP_NAMES/IMPORT_SKIP_EXTENSIONS keep build output (build/, dist/, *.o, *.pyc, ...) out of the walk entirely. Recovering what already leaked is a separate concern: a new CLI subcommand (plus matching make targets) sweeps soft-deleted attachment/project-file blobs and any blob with zero DB reference at all, plus orphaned container workspace directories. run_maintenance_cleanup.sh wraps the existing prune/clear commands for routine disk upkeep. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWJy6PrMMt5hwWxQwia2rd
62 lines
1.3 KiB
TOML
62 lines
1.3 KiB
TOML
[project]
|
|
name = "devplacepy"
|
|
version = "1.0.4"
|
|
description = "DevPlace - The Developer Social Network"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi",
|
|
"uvicorn[standard]",
|
|
"jinja2",
|
|
"python-multipart",
|
|
"dataset",
|
|
"passlib[bcrypt]",
|
|
"python-dotenv",
|
|
"aiofiles",
|
|
"httpx[http2]",
|
|
"curl_cffi",
|
|
"brotli",
|
|
"zstandard",
|
|
"cryptography",
|
|
"PyJWT",
|
|
"multiavatar",
|
|
"locust",
|
|
"Pillow",
|
|
"imagehash",
|
|
"uuid_utils",
|
|
"mistune",
|
|
"emoji",
|
|
"pypdf",
|
|
"playwright",
|
|
"playwright-stealth",
|
|
"chromadb",
|
|
"weasyprint",
|
|
"cairosvg",
|
|
"sqlglot",
|
|
"curl_cffi",
|
|
"faker",
|
|
"defusedxml",
|
|
]
|
|
|
|
[project.scripts]
|
|
devplace = "devplacepy.cli:main"
|
|
devii = "devplacepy.services.devii.cli:main"
|
|
devplace-xmlrpc = "devplacepy.services.xmlrpc.server:main"
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest", "playwright", "requests", "coverage"]
|
|
bots = ["playwright", "faker"]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests/unit", "tests/api", "tests/e2e"]
|
|
python_files = ["*.py"]
|
|
addopts = "--tb=line -rf -p no:xdist"
|
|
filterwarnings = [
|
|
"ignore:'crypt' is deprecated",
|
|
"ignore:Using `httpx` with `starlette.testclient` is deprecated",
|
|
"ignore:invalid escape sequence",
|
|
]
|