(
self,
*,
account_id: str,
action: str,
source: str = "",
product_id: str = "",
pay_type: str = "",
details: dict[str, Any] | None = None,
)
| 94 | (self.settings.runtime_logs_dir / "accounts").mkdir(parents=True, exist_ok=True) |
| 95 | |
| 96 | def start_run( |
| 97 | self, |
| 98 | *, |
| 99 | account_id: str, |
| 100 | action: str, |
| 101 | source: str = "", |
| 102 | product_id: str = "", |
| 103 | pay_type: str = "", |
| 104 | details: dict[str, Any] | None = None, |
| 105 | ) -> FlowRun: |
| 106 | run = FlowRun( |
| 107 | run_id=self._make_run_id(), |
| 108 | account_id=account_id, |
| 109 | action=action.strip() or "flow", |
| 110 | source=source.strip(), |
| 111 | product_id=product_id.strip(), |
| 112 | pay_type=pay_type.strip(), |
| 113 | ) |
| 114 | self.log_event( |
| 115 | run, |
| 116 | stage="run", |
| 117 | status="started", |
| 118 | message=f"{run.action} started", |
| 119 | details=details, |
| 120 | ) |
| 121 | return run |
| 122 | |
| 123 | def finish_run( |
| 124 | self, |
no test coverage detected