details: https://code.tryton.org/tryton/commit/02567102eb63
branch: default
user: Cédric Krier <[email protected]>
date: Wed Sep 16 14:35:33 2026 +0200
description:
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
diffstat:
trytond/trytond/backend/postgresql/database.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 8c9dff9967a7 -r 02567102eb63
trytond/trytond/backend/postgresql/database.py
--- a/trytond/trytond/backend/postgresql/database.py Thu Sep 10 08:13:03
2026 +0200
+++ b/trytond/trytond/backend/postgresql/database.py Wed Sep 16 14:35:33
2026 +0200
@@ -486,7 +486,7 @@
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()