fix(lint): resolve remaining ruff errors and unblock MCP SSE test (#1)
Some checks failed
CI / lint (push) Failing after 2s
CI / typecheck (push) Failing after 1s
CI / test (push) Failing after 1s
CI / Secret scan (gitleaks) (push) Failing after 2s
CI / Security audit (bandit) (push) Failing after 2s

This commit is contained in:
Crypto Rug Munch 2026-07-02 23:18:40 +02:00
parent a7c30b12cd
commit 98eebe62bf
17 changed files with 60 additions and 87 deletions

View file

@ -7,6 +7,7 @@ Long-running jobs like crawls, monitors, and bulk imports should not block reque
# Part of Pry — https://git.rugmunch.io/RugMunchMedia/pryscraper
# Licensed under MIT. See LICENSE.
import asyncio
import importlib.util
import json
import logging
import uuid
@ -20,12 +21,7 @@ from paths import PRY_DATA_DIR
logger = logging.getLogger(__name__)
# Try Celery
try:
from celery import Celery
_has_celery = True
except ImportError:
_has_celery = False
_has_celery = importlib.util.find_spec("celery") is not None
JOBS_DIR = PRY_DATA_DIR / "jobs"
JOBS_DIR.mkdir(parents=True, exist_ok=True)