changeset bb1802df2d93 in trytond:5.4
details: https://hg.tryton.org/trytond?cmd=changeset;node=bb1802df2d93
description:
Convert interval into seconds
The correct way to convert interval into seconds is to use
"EXTRACT(EPOCH FROM ...)". The "SECOND" gives only the value of the
second
field.
issue9126
review297181005
(grafted from 7ab2d9708d71280e3bd6885f0d1916b8bcec092e)
diffstat:
trytond/ir/queue.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r ac0e64ffdcf4 -r bb1802df2d93 trytond/ir/queue.py
--- a/trytond/ir/queue.py Sun Mar 15 16:47:07 2020 +0100
+++ b/trytond/ir/queue.py Tue Mar 17 23:21:20 2020 +0100
@@ -103,7 +103,7 @@
candidates.expected_at.nulls_first],
limit=1))
next_timeout = With('seconds', query=candidates.select(
- Min(Extract('second',
+ Min(Extract('EPOCH',
candidates.scheduled_at - CurrentTimestamp())
),
where=candidates.scheduled_at >= CurrentTimestamp()))