def _collect_pending_items(): """Gather all sources to create or delete.""" create_events = storage.load_providers_to_create() destroy_events = storage.load_providers_to_delete() pending_events = create_events + destroy_events pending_events.sort(key=lambda item: item.get('offset')) return pending_events
def _collect_pending_items(): """Gather all sources to create update, or delete.""" create_events = storage.load_providers_to_create() update_events = storage.load_providers_to_update() destroy_events = storage.load_providers_to_delete() pending_events = create_events + update_events + destroy_events return pending_events