import redis, os r = redis.from_url(f"redis://:{os.environ.get('REDIS_PASSWORD','')}@{os.environ['REDIS_HOST']}:{os.environ['REDIS_PORT']}/0") for q in ["ingestion","parsing","extraction","aggregation","recommendation","lake_publish","broker_orders"]: depth = r.llen(f"stonks:queue:{q}") print(f" {q:20} {depth:>4} pending") # Check dead letter queues for q in ["ingestion","parsing","extraction","aggregation","recommendation"]: depth = r.llen(f"stonks:dlq:{q}") if depth > 0: print(f" DLQ {q:16} {depth:>4} dead letters")