Skip to content

Commit d08f236

Browse files
committed
RHINENG-25740: remove unused mark_systems_stale()
1 parent 9fa629b commit d08f236

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

database_admin/schema/create_schema.sql

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -356,30 +356,6 @@ BEGIN
356356
END;
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-
383359
CREATE OR REPLACE FUNCTION hash_partition_id(id int, parts int)
384360
RETURNS int AS
385361
$$

0 commit comments

Comments
 (0)