diff options
author | Vika <vika@fireburn.ru> | 2023-07-09 21:06:55 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-07-09 21:06:55 +0300 |
commit | b38b508366a80a2f1c163ae3623c79e883323201 (patch) | |
tree | 03d3ea5c90b9e64641b4d32c8accec5a2380e570 /kittybox-rs/src/webmentions/mod.rs | |
parent | 89a35e9dbeb972b50008c7272a87f8eed5121d8c (diff) | |
download | kittybox-b38b508366a80a2f1c163ae3623c79e883323201.tar.zst |
webmentions/queue: move JobQueue trait into kittybox-util
The trait itself seems basic enough that it could be reused elsewhere. Better to keep it in a separate crate. `-util` is a dumping ground for various things anyway.
Diffstat (limited to 'kittybox-rs/src/webmentions/mod.rs')
-rw-r--r-- | kittybox-rs/src/webmentions/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kittybox-rs/src/webmentions/mod.rs b/kittybox-rs/src/webmentions/mod.rs index cffd064..630a1a6 100644 --- a/kittybox-rs/src/webmentions/mod.rs +++ b/kittybox-rs/src/webmentions/mod.rs @@ -11,8 +11,10 @@ pub struct Webmention { target: String, } -impl queue::JobItem for Webmention { +impl queue::JobItem for Webmention {} +impl queue::PostgresJobItem for Webmention { const DATABASE_NAME: &'static str = "kittybox.incoming_webmention_queue"; + const NOTIFICATION_CHANNEL: &'static str = "incoming_webmention"; } async fn accept_webmention<Q: JobQueue<Webmention>>( |