File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040logger = logging .getLogger (__name__ )
4141
4242# Database Configuration
43- # Using SQLite for this example, but can be swapped for PostgreSQL/MySQL
44- DB_URL = os .getenv ("DATABASE_URL" , "mysql+asyncmy ://cqrs:cqrs@localhost:3307/test_cqrs " )
43+ # Using SQLite for this example, but can be swapped for PostgreSQL/MySQL via DATABASE_URL
44+ DB_URL = os .getenv ("DATABASE_URL" , "sqlite+aiosqlite :///./test.db " )
4545
4646
4747# ============================================================================
Original file line number Diff line number Diff line change @@ -168,8 +168,12 @@ async def __aiter__(
168168 run_cm = None
169169
170170 if run_cm is not None :
171- async with run_cm as run :
172- async for step_result in self ._execute (run ):
171+ try :
172+ async with run_cm as run :
173+ async for step_result in self ._execute (run ):
174+ yield step_result
175+ except NotImplementedError :
176+ async for step_result in self ._execute (None ):
173177 yield step_result
174178 else :
175179 async for step_result in self ._execute (None ):
Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ async def update_status(
238238 version = SagaExecutionModel .version + 1 ,
239239 ),
240240 )
241- if result .rowcount == 0 :
241+ if result .rowcount == 0 : # pyright: ignore[reportAttributeAccessIssue]
242242 raise SagaConcurrencyError (
243243 f"Saga { saga_id } does not exist or was modified concurrently" ,
244244 )
You can’t perform that action at this time.
0 commit comments