print background compile errors ASAP (#2596)
This commit is contained in:
parent
b5f06991a9
commit
b130dd07cd
@ -11,7 +11,10 @@ if "app" != constants.CompileVars.APP:
|
||||
|
||||
app_module = get_app(reload=False)
|
||||
app = getattr(app_module, constants.CompileVars.APP)
|
||||
ThreadPoolExecutor(max_workers=1).submit(app.compile_)
|
||||
# Force background compile errors to print eagerly
|
||||
ThreadPoolExecutor(max_workers=1).submit(app.compile_).add_done_callback(
|
||||
lambda f: f.result()
|
||||
)
|
||||
|
||||
# ensure only "app" is exposed.
|
||||
del app_module
|
||||
|
Loading…
Reference in New Issue
Block a user