Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / class
RedisNotifier
codeintel.notify.RedisNotifier
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 |
|---|---|---|
| get_notifier | notify.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| __init__ | notify.py | same file |
| notify | notify.py | same file |
| wait | notify.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| notify | notify.py | same file |
codeintel.notify.RedisNotifierbackend/app/codeintel/notify.py, lines 50–74Open source
class RedisNotifier(Notifier): name = "redis" def __init__(self, url: str, key: str) -> None: import redis self.key = key self._client = redis.Redis.from_url(url, socket_timeout=60, socket_connect_timeout=10) def notify(self, job_id: str) -> bool: try: self._client.rpush(self.key, json.dumps({"job_id": job_id})) return True except Exception as exc: logger.warning("Job notification failed (job stays queued in the DB): %s", type(exc).__name__) return False def wait(self, timeout: int) -> str | None: try: item = self._client.blpop([self.key], timeout=timeout) except Exception as exc: logger.warning("Redis BLPOP failed (%s); falling back to DB polling", type(exc).__name__) time.sleep(min(timeout, 5)) return None return _parse(item[1]) if item else NoneWhat the index recorded
- Signature
class RedisNotifier(Notifier):- File
backend/app/codeintel/notify.py- Lines
- 50–74
- Parser
- python-ast
- Git blob
fc15788e6d2a98f2857ebab4c81c9c193abb5873- Outside this subset
- 1 more edges reach code outside the graph shown here
