Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / module
notify
codeintel.notify
PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.
PHAROS at 975a38dMIT license
Around this symbol
Search all symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| _parse | notify.py | same file |
| get_notifier | notify.py | same file |
| Notifier | notify.py | same file |
| RedisNotifier | notify.py | same file |
| UpstashRestNotifier | notify.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| router | router.py | through an import |
codeintel.notifybackend/app/codeintel/notify.py, lines 1–40Open source
"""Job wake-up notifications (Redis), with the database as the fallback.Notifications are an optimisation: they let an idle worker block on a cheapRedis BLPOP instead of polling PostgreSQL (which would keep a serverlessdatabase awake). They are allowed to be lost or duplicated — see``jobs.py``. The payload ``{"job_id": "..."}`` is pushed to the existing``ingest_queue`` key by default, so the production edge worker(``main_worker.py``), which already BLPOPs that key, picks jobs up withoutan extra Redis connection.Backends, chosen by :func:`get_notifier`:* ``REDIS_URL`` (``redis://`` or Upstash's ``rediss://``) — redis-py;* ``UPSTASH_REDIS_REST_URL`` + token — Upstash REST over https;* neither — no notifications; workers poll the database."""from __future__ import annotationsimport jsonimport loggingimport timelogger = logging.getLogger(__name__)class Notifier: name = "none" def notify(self, job_id: str) -> bool: return False def wait(self, timeout: int) -> str | None: time.sleep(timeout) return Nonedef _parse(raw) -> str | None: if raw is None: return NoneShows the first 40 of 120 lines. The rest is on GitHub at this commit.
What the index recorded
- Signature
module backend.app.codeintel.notify- File
backend/app/codeintel/notify.py- Lines
- 1–120
- Parser
- python-ast
- Git blob
fc15788e6d2a98f2857ebab4c81c9c193abb5873- Call sites
- 1 named, 0 resolved, 1 left unlinked
- Outside this subset
- 4 more edges reach code outside the graph shown here
