Improved code quality with more idiomatic Python patterns and safer initialization.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 4s
CI / Tests (push) Successful in 21s
CI / Type Checking (push) Failing after 10s
CI / Spelling (push) Successful in 5s

This commit is contained in:
2026-03-22 14:41:38 -04:00
parent 371f7d2ca3
commit 2cf00fde4f
13 changed files with 148 additions and 79 deletions
+11 -1
View File
@@ -80,10 +80,20 @@ def _parse_args(argv: list[str] | None = None) -> argparse.Namespace:
' variable or "crabstero.db").'
),
)
workers_env = os.environ.get("INGESTION_WORKERS", "4")
try:
workers_default = int(workers_env)
except ValueError:
logger.warning(
"Invalid INGESTION_WORKERS value '%s', defaulting to 4.",
workers_env,
)
workers_default = 4
parser.add_argument(
"--ingestion-workers",
type=int,
default=int(os.environ.get("INGESTION_WORKERS", "4")),
default=workers_default,
help=(
"Number of concurrent ingestion workers"
" (default: INGESTION_WORKERS environment"