Skip to content

Commit f96ce2a

Browse files
committed
Correcting query
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 54b9c52 commit f96ce2a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

coderd/database/queries.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/notifications.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ RETURNING *;
3636
WITH acquired AS (
3737
UPDATE
3838
notification_messages
39-
SET queued_seconds = GREATEST(0, EXTRACT(EPOCH FROM (NOW() - updated_at)))::FLOAT,
39+
SET queued_seconds = CEIL(GREATEST(0, EXTRACT(EPOCH FROM (NOW() - updated_at))))::INTEGER,
4040
updated_at = NOW(),
4141
status = 'leased'::notification_message_status,
4242
status_reason = 'Leased by notifier ' || sqlc.arg('notifier_id')::uuid,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy