File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -356,30 +356,6 @@ BEGIN
356356END;
357357$delete_system$ LANGUAGE ' plpgsql' ;
358358
359- CREATE OR REPLACE FUNCTION mark_stale_systems (mark_limit integer )
360- RETURNS INTEGER
361- AS
362- $fun$
363- DECLARE
364- marked integer ;
365- BEGIN
366- WITH ids AS (
367- SELECT rh_account_id, id, stale_warning_timestamp < now() as expired
368- FROM system_inventory
369- WHERE stale != (stale_warning_timestamp < now())
370- ORDER BY rh_account_id, id FOR UPDATE OF system_inventory
371- LIMIT mark_limit
372- )
373- UPDATE system_inventory si
374- SET stale = ids .expired
375- FROM ids
376- WHERE si .rh_account_id = ids .rh_account_id
377- AND si .id = ids .id ;
378- GET DIAGNOSTICS marked = ROW_COUNT;
379- RETURN marked;
380- END;
381- $fun$ LANGUAGE plpgsql;
382-
383359CREATE OR REPLACE FUNCTION hash_partition_id (id int , parts int )
384360 RETURNS int AS
385361$$
You can’t perform that action at this time.
0 commit comments