From 0f58b854feac36fea0b4284cc3dcf0f250444d14 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 16 Apr 2025 09:06:16 +1000 Subject: [PATCH] Prevent duplicate call to "frontend compile" (#9519) - Reduces `invoke update` time significantly --- tasks.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tasks.py b/tasks.py index 339950849d..eebb73d939 100644 --- a/tasks.py +++ b/tasks.py @@ -474,8 +474,7 @@ def remove_mfa(c, mail=''): def static(c, frontend=False, clear=True, skip_plugins=False): """Copies required static files to the STATIC_ROOT directory, as per Django requirements.""" if frontend and node_available(): - frontend_trans(c, extract=False) - frontend_build(c) + frontend_compile(c) info('Collecting static files...') @@ -507,9 +506,7 @@ def translate(c, ignore_static=False, no_frontend=False): manage(c, 'compilemessages') if not no_frontend and node_available(): - frontend_install(c) - frontend_trans(c) - frontend_build(c) + frontend_compile(c) # Update static files if not ignore_static: @@ -686,7 +683,9 @@ def update( frontend_download(c) if not skip_static: - static(c, frontend=not no_frontend) + # Collect static files + # Note: frontend has already been compiled if required + static(c, frontend=False) success('InvenTree update complete!')