From 94e6d1a7c08f21c625c608c28b2197b3bb0355e5 Mon Sep 17 00:00:00 2001 From: Jacopo Farina Date: Mon, 8 Apr 2024 10:03:30 +0200 Subject: [PATCH] Cover queue_name in the index too --- postgrestq/task_queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgrestq/task_queue.py b/postgrestq/task_queue.py index 84320f3..fd8f787 100644 --- a/postgrestq/task_queue.py +++ b/postgrestq/task_queue.py @@ -101,8 +101,8 @@ def _create_queue_table(self) -> None: cur.execute( sql.SQL( """CREATE INDEX IF NOT EXISTS - task_queue_can_start_at_idx - ON {} (can_start_at) + task_queue_queue_name_can_start_at_idx + ON {} (queue_name, can_start_at) """ ).format(sql.Identifier(self._table_name)) )