Compile openapi client in background when django runserver is reloading

This commit is contained in:
klmp200 committed 2025-03-09 15:55:37 +01:00
1 parent 98175e397c
commit 05edf33062
4 files changed
+23 -9

No files matched your search

@@ -50,7 +50,13 @@ class Command(CollectStatic):
return Path(location)
Scss.compile(self.collect_scss())
OpenApi.compile() # This needs to be prior to javascript bundling
openapi = OpenApi.compile() # This needs to be prior to javascript bundling
if openapi is not None:
_ = openapi.wait()
if openapi.returncode:
raise RuntimeError(
f"Openapi generation failed with returncode {openapi.returncode}"
)
JSBundler.compile()
collected = super().collect()