Run the script synchronously for CLI tools like export.
(self, script_path: str)
| 298 | logger.debug("[ScriptRunner] Restored stdout") |
| 299 | |
| 300 | def run_sync(self, script_path: str): |
| 301 | """Run the script synchronously for CLI tools like export.""" |
| 302 | import asyncio |
| 303 | |
| 304 | self.script_path = script_path |
| 305 | self._state = ScriptState.RUNNING |
| 306 | self._run_count = 1 |
| 307 | |
| 308 | # block on the async `run_script()` method |
| 309 | asyncio.run(self.run_script()) |
| 310 | |
| 311 | async def run_script(self): |
| 312 | """ |
no test coverage detected