Only copy assets if assets exist
This commit is contained in:
parent
f8eba338e0
commit
a11cd51c69
@ -1017,7 +1017,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# try to be somewhat accurate - but still not 100%
|
# try to be somewhat accurate - but still not 100%
|
||||||
adhoc_steps_without_executor = 8
|
adhoc_steps_without_executor = 7
|
||||||
fixed_pages_within_executor = 5
|
fixed_pages_within_executor = 5
|
||||||
progress.start()
|
progress.start()
|
||||||
task = progress.add_task(
|
task = progress.add_task(
|
||||||
@ -1097,12 +1097,15 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
progress.advance(task)
|
progress.advance(task)
|
||||||
|
|
||||||
# Copy the assets.
|
# Copy the assets.
|
||||||
with console.timing("Copy assets"):
|
assets_src = Path.cwd() / constants.Dirs.APP_ASSETS
|
||||||
path_ops.update_directory_tree(
|
if assets_src.is_dir():
|
||||||
src=Path.cwd() / constants.Dirs.APP_ASSETS,
|
with console.timing("Copy assets"):
|
||||||
dest=Path.cwd() / prerequisites.get_web_dir() / constants.Dirs.PUBLIC,
|
path_ops.update_directory_tree(
|
||||||
)
|
src=assets_src,
|
||||||
progress.advance(task)
|
dest=(
|
||||||
|
Path.cwd() / prerequisites.get_web_dir() / constants.Dirs.PUBLIC
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
# Use a forking process pool, if possible. Much faster, especially for large sites.
|
# Use a forking process pool, if possible. Much faster, especially for large sites.
|
||||||
# Fallback to ThreadPoolExecutor as something that will always work.
|
# Fallback to ThreadPoolExecutor as something that will always work.
|
||||||
|
Loading…
Reference in New Issue
Block a user