diff options
author | Vika <vika@fireburn.ru> | 2023-07-09 18:25:58 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-07-09 18:25:58 +0300 |
commit | ca422132c8f739f3ee873046a3f59d80f2462152 (patch) | |
tree | 2eecdd714d94481e1131f52626553a93a69cfe95 /kittybox-rs/src/webmentions/mod.rs | |
parent | 9ce77c472bef59918d14b52af1332e454516e486 (diff) | |
download | kittybox-ca422132c8f739f3ee873046a3f59d80f2462152.tar.zst |
webmentions/queue: give up on an item after 5 attempts
This also involves a crude "async drop" implementation that fires a future incrementing an attempt if a Job has been dropped without marking it as done.
Diffstat (limited to 'kittybox-rs/src/webmentions/mod.rs')
-rw-r--r-- | kittybox-rs/src/webmentions/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kittybox-rs/src/webmentions/mod.rs b/kittybox-rs/src/webmentions/mod.rs index 1c4886e..d798c50 100644 --- a/kittybox-rs/src/webmentions/mod.rs +++ b/kittybox-rs/src/webmentions/mod.rs @@ -11,6 +11,10 @@ pub struct Webmention { target: String, } +impl queue::JobItem for Webmention { + const DATABASE_NAME: &'static str = "kittybox.incoming_webmention_queue"; +} + async fn accept_webmention<Q: JobQueue<Webmention>>( Form(webmention): Form<Webmention>, Extension(queue): Extension<Q> |