From ca422132c8f739f3ee873046a3f59d80f2462152 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 9 Jul 2023 18:25:58 +0300 Subject: 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. --- kittybox-rs/src/webmentions/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kittybox-rs/src/webmentions/mod.rs') 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>( Form(webmention): Form, Extension(queue): Extension -- cgit 1.4.1