Returns a persistece config to be used during run. Needs to be passed to ``pw.run`` so that tables created using StreamGenerator are filled with data.
(self)
| 714 | ) |
| 715 | |
| 716 | def persistence_config(self) -> persistence.Config | None: |
| 717 | """Returns a persistece config to be used during run. Needs to be passed to ``pw.run`` |
| 718 | so that tables created using StreamGenerator are filled with data. |
| 719 | """ |
| 720 | |
| 721 | if len(self.events) == 0: |
| 722 | return None |
| 723 | return persistence.Config( |
| 724 | persistence.Backend.mock(self.events), |
| 725 | snapshot_access=api.SnapshotAccess.REPLAY, |
| 726 | persistence_mode=api.PersistenceMode.SPEEDRUN_REPLAY, |
| 727 | ) |