-
Notifications
You must be signed in to change notification settings - Fork 1.3k
perf: Add init and cleanup of long lived resources #4642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
87d59fe
7793d99
f04711e
d1094ad
afaa412
2245caa
eebf71d
e593c1a
f50c6cb
5c4a88a
92dc4bd
ee2249a
5c69273
385e3ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Rob Howley <howley.robert@gmail.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,10 +101,10 @@ def async_refresh(): | |
| @asynccontextmanager | ||
| async def lifespan(app: FastAPI): | ||
| async_refresh() | ||
| # await store.initialize() | ||
| await store.initialize() | ||
| yield | ||
| stop_refresh() | ||
| # await store.close() | ||
| await store.close() | ||
|
Comment on lines
+103
to
+107
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can create and cleanup resources as part of the feature server lifespan
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you remove this and let's rerun the integration test? Or maybe create a separate branch without it? |
||
|
|
||
| app = FastAPI(lifespan=lifespan) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.