fn flush_pending_events( config: &Config, sink: &PostHogSink, abort_signal: &AbortSignal, ) -> Result<()>