Since rdmutil get_all_ids returns all the latest version ids of published records I need to also have a way to list the stale version ids too, e.g. rdmutil get_all_stale_ids. Instead of using a JOIN between rdm_records_metadata and rdm_versions_state and checking for a value in rdm_versions_state.last_id I can check for a null row, then list the record if it is public. This will allow us to cleanup stale records from the dataset collections used for feeds.
Since
rdmutil get_all_ids
returns all the latest version ids of published records I need to also have a way to list the stale version ids too, e.g.rdmutil get_all_stale_ids
. Instead of using a JOIN between rdm_records_metadata and rdm_versions_state and checking for a value in rdm_versions_state.last_id I can check for a null row, then list the record if it is public. This will allow us to cleanup stale records from the dataset collections used for feeds.