Compile openapi client in background when django runserver is reloading

This commit is contained in:
2025-03-05 11:20:27 +01:00
parent 98175e397c
commit 05edf33062
4 changed files with 23 additions and 9 deletions

View File

@ -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()