diff options
Diffstat (limited to 'examples/web/asgi_noframework.py')
-rw-r--r-- | examples/web/asgi_noframework.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/web/asgi_noframework.py b/examples/web/asgi_noframework.py index c3ac184..4b57c30 100644 --- a/examples/web/asgi_noframework.py +++ b/examples/web/asgi_noframework.py @@ -64,6 +64,7 @@ async def scheduler_middleware(scope, receive, send): event_broker = AsyncpgEventBroker.from_async_sqla_engine(engine) async with AsyncScheduler(data_store, event_broker) as scheduler: await scheduler.add_schedule(tick, IntervalTrigger(seconds=1), id="tick") + await scheduler.start_in_background() await original_app(scope, receive, send) else: await original_app(scope, receive, send) |