Skip to content

Commit 114797d

Browse files
committed
Correcting query
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 387b557 commit 114797d

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)