pub(super) async fn recv_action(
        &mut self,
        max_wait: tokio::time::Duration,
    ) -> Option<SyncAction> {
        if let Some(action) = self.pop_action() {
            return Some(action);
        }
        let action = tokio::time::timeout(max_wait, self.receiver.recv())
            .await
            .ok()??;
        QUEUE_METRICS.action_queue_size.dec_by(1);
        Some(action)
    }
Removes the first action from the queue.
core/node/node_sync/src/sync_action.rs