From 77334433323372beef448a06aababce6c4e041ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 16 Sep 2026 14:35:33 +0200 Subject: [PATCH] Set timeout to 0 when receiving PostgreSQL notifications There is no need to wait 2 seconds for more notifications as we call get_notifications only when the selector is triggered. Closes #15102 (grafted from 02567102eb63f69faedf61ae83c51a5075b57588) --HG-- branch : 8.0 --- trytond/trytond/backend/postgresql/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/trytond/backend/postgresql/database.py b/trytond/trytond/backend/postgresql/database.py index 2dec0f9c10..49bc85ecdd 100644 --- a/trytond/trytond/backend/postgresql/database.py +++ b/trytond/trytond/backend/postgresql/database.py @@ -480,7 +480,7 @@ class Database(DatabaseInterface): cursor.execute('SELECT pg_notify(%s, %s)', (channel, payload)) def get_notifications(self, connection): - return list(connection.notifies(timeout=2)) + return list(connection.notifies(timeout=0)) def lock(self, connection, table): cursor = connection.cursor()