mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-27 19:16:44 +00:00
Prevent duplicate call to "frontend compile" (#9519)
- Reduces `invoke update` time significantly
This commit is contained in:
parent
99955c56d8
commit
0f58b854fe
11
tasks.py
11
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!')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user