Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Vacuum only rooms on compliant backends (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
feymartynov committed Feb 9, 2021
1 parent 4991285 commit 2f53692
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/db/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use serde_json::Value as JsonValue;
use svc_agent::AgentId;
use uuid::Uuid;

use crate::backend::janus::JANUS_API_VERSION;
use crate::db::janus_backend::Object as JanusBackend;
use crate::db::recording::{Object as Recording, Status as RecordingStatus};
use crate::schema::{janus_backend, recording, room, rtc};
Expand Down Expand Up @@ -188,6 +189,7 @@ pub(crate) fn finished_with_in_progress_recordings(
.inner_join(rtc::table.inner_join(recording::table))
.inner_join(janus_backend::table.on(janus_backend::id.nullable().eq(room::backend_id)))
.filter(room::backend.eq(RoomBackend::Janus))
.filter(janus_backend::api_version.eq(JANUS_API_VERSION))
.filter(sql("upper(\"room\".\"time\") < now()"))
.filter(recording::status.eq(RecordingStatus::InProgress))
.select((
Expand Down

0 comments on commit 2f53692

Please sign in to comment.