Postgres example storage

This commit is contained in:
Igor Katson 2024-08-15 13:31:56 +01:00
parent 9d394116c0
commit f22814c77b
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
6 changed files with 748 additions and 24 deletions

View file

@ -350,6 +350,10 @@ impl ManagedTorrent {
}
}
pub fn is_paused(&self) -> bool {
self.with_state(|s| matches!(s, ManagedTorrentState::Paused(..)))
}
/// Pause the torrent if it's live.
pub(crate) fn pause(&self) -> anyhow::Result<()> {
let mut g = self.locked.write();