()
| 113 | pass |
| 114 | |
| 115 | async def modify_state_task(): |
| 116 | from reflex.utils.prerequisites import get_app |
| 117 | |
| 118 | reflex_app = get_app().app |
| 119 | try: |
| 120 | while True: |
| 121 | for token in list(connected_tokens): |
| 122 | async with reflex_app.modify_state( |
| 123 | BaseStateToken(ident=token, cls=LifespanState) |
| 124 | ) as state: |
| 125 | lifespan_state = await state.get_state(LifespanState) |
| 126 | lifespan_state.modify_count += 1 |
| 127 | await asyncio.sleep(0.1) |
| 128 | except asyncio.CancelledError: |
| 129 | print("modify_state_task cancelled.") |
| 130 | |
| 131 | def index(): |
| 132 | return rx.vstack( |
nothing calls this directly
no test coverage detected