From 243dbabfba506eea19f8a44d6f720902dfc97dbf Mon Sep 17 00:00:00 2001 From: polyrand <37962604+d0l-phin@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:28:32 +0200 Subject: [PATCH] change branching --- litequeue.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/litequeue.py b/litequeue.py index b381596..2db4530 100644 --- a/litequeue.py +++ b/litequeue.py @@ -526,11 +526,10 @@ def prune(self, include_failed: bool = True): self.conn.execute( f"DELETE FROM Queue WHERE status IN ({MessageStatus.DONE.value}, {MessageStatus.FAILED.value})" ) - return - self.conn.execute( - f"DELETE FROM Queue WHERE status IN ({MessageStatus.DONE.value})" - ) - return + else: + self.conn.execute( + f"DELETE FROM Queue WHERE status IN ({MessageStatus.DONE.value})" + ) def vacuum(self): """