Skip to main content

## drain_pending_favorites

# Function drain_pending_favorites

Source

    pub async fn drain_pending_favorites(
        db: &Arc<RusqliteService>,
        sink: &dyn FavoriteSink,
        user_id: &str,
    ) -> Result<Vec<String>, String>

Expand description

Push pending favourite changes to the server and clear their flags.

Returns the ids that reached the server, for the `favorites-changed` event. A row whose push fails keeps `pending_sync = 1` and is retried on the next reconnect rather than being dropped.

TRACES: UR-069 | DR-120 | UT-103