Skip to content

Commit

Permalink
Add Redis Queue Dashboard to Phone Sensors API
Browse files Browse the repository at this point in the history
  • Loading branch information
Microwave-WYB committed May 29, 2024
1 parent c7447bf commit 32bf986
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions phone_sensors/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
from fastapi import Depends, FastAPI, Form, HTTPException, UploadFile
from fastapi.responses import RedirectResponse
from redis import Redis
from rq_dashboard_fast import RedisQueueDashboard

from phone_sensors.birdnet import submit_analyze_audio_job
from phone_sensors.schemas import SensorStatus
from phone_sensors.settings import get_db_session, get_redis_connection

app = FastAPI(title="Phone Sensors API", version="0.1.0")
dashboard = RedisQueueDashboard("redis://redis:6379/", "/rq")

app.mount("/rq", dashboard)


@app.get("/")
Expand Down

0 comments on commit 32bf986

Please sign in to comment.