pub async fn fetch_history_and_replay(
        &mut self,
        wf_id: impl Into<String>,
        run_id: impl Into<String>,
        // TODO: Need not be passed in
        worker: &mut Worker,
    ) -> Result<(), anyhow::Error> {
        // Fetch history and replay it
        let history = self
            .get_client()
            .await
            .get_workflow_execution_history(wf_id.into(), Some(run_id.into()), vec![])
            .await?
            .history
            .expect("history field must be populated");
        let (replay_worker, _) = init_core_replay_preloaded(worker.task_queue(), &history);
        worker.with_new_core_worker(replay_worker);
        worker.run().await.unwrap();
        Ok(())
    }
/// Fetch the history for the indicated workflow and replay it using the provided worker.
/// Can be used after completing workflows normally to ensure replay works as well.
Fetch the history for the indicated workflow and replay it using the provided worker.
Can be used after completing workflows normally to ensure replay works as well.
Fetch the history for the indicated workflow and replay it using the provided worker . Can be used after completing workflows normally to ensure replay works as well .
pub async fn fetch_history_and_replay(
        &mut self,
        wf_id: impl Into<String>,
        run_id: impl Into<String>,
        // TODO: Need not be passed in
        worker: &mut Worker,
    ) -> Result<(), anyhow::Error> {
        // Fetch history and replay it
        let history = self
            .get_client()
            .await
            .get_workflow_execution_history(wf_id.into(), Some(run_id.into()), vec![])
            .await?
            .history
            .expect("history field must be populated");
        let (replay_worker, _) = init_core_replay_preloaded(worker.task_queue(), &history);
        worker.with_new_core_worker(replay_worker);
        worker.run().await.unwrap();
        Ok(())
    }
pub async fn fetch_history_and_replay ( & mut self , wf_id : impl Into < String > , run_id : impl Into < String > , // TODO: Need not be passed in worker : & mut Worker , ) -> Result < ( ) , anyhow :: Error > { // Fetch history and replay it let history = self . get_client ( ) . await . get_workflow_execution_history ( wf_id . into ( ) , Some ( run_id . into ( ) ) , vec ! [ ] ) . await ? . history . expect ( " " ) ; let ( replay_worker , _ ) = init_core_replay_preloaded ( worker . task_queue ( ) , & history ) ; worker . with_new_core_worker ( replay_worker ) ; worker . run ( ) . await . unwrap ( ) ; Ok ( ( ) ) }
Fetch the history for the indicated workflow and replay it using the provided worker.
Fetch the history for the indicated workflow and replay it using the provided worker .
&mut self
wf_id
impl Into<String>
run_id
impl Into<String>
worker
&mut Worker
&mut self
wf_id
impl Into<String>
run_id
impl Into<String>
worker
&mut Worker