Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 16:19:49.675 [info] cargo_wrk process_message Topic <<"order/save">>
- 16:19:49.675 [info] cargo_wrk process_message Pid <0.1840.0>
- Fired "verif_deallocation"
- Time {{2020,1,17},{16,20,0}}
- Fired "test"
- Time {{2020,1,17},{16,20,0}}
- test chronium!
- is_on_verification
- 300
- WITH last_users_records0 AS (
- SELECT parent_id, max(date) AS date
- FROM verifications
- GROUP BY parent_id
- ),
- last_users_records AS (
- SELECT l.parent_id, l.date, v.parent_table, v.verified_until as verif_until
- FROM last_users_records0 as l
- INNER JOIN verifications as v
- ON l.parent_id = v.parent_id AND l.date = v.date
- WHERE
- v.status = $1
- )
- SELECT
- v.parent_id as id,
- v.parent_table as object_type,
- v.verif_until
- FROM last_users_records AS v
- WHERE date_trunc('minute', v.date + interval '1 second' * $2) <= date_trunc('minute',now() at time zone 'utc 0')
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement