mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 02:55:41 +00:00
Add namespaces to tasks (#7904)
* Namespaces for invoke tasks Fixes #7852 * adjust various places that call re-namespaced tasks * use full invoke command easier for future refactors * fix call name * move worker to int * adapt calls in tasks * fix changed path * ignore localhost links * Avoid using internal names
This commit is contained in:
@ -115,7 +115,7 @@ RUN apk add --no-cache --update nodejs npm yarn
|
||||
RUN yarn config set network-timeout 600000 -g
|
||||
COPY src ${INVENTREE_HOME}/src
|
||||
COPY tasks.py ${INVENTREE_HOME}/tasks.py
|
||||
RUN cd ${INVENTREE_HOME} && inv frontend-compile
|
||||
RUN cd ${INVENTREE_HOME} && invoke int.frontend-compile
|
||||
|
||||
# InvenTree production image:
|
||||
# - Copies required files from local directory
|
||||
|
@ -56,7 +56,7 @@ services:
|
||||
inventree-dev-worker:
|
||||
image: inventree-dev-image
|
||||
build: *build_config
|
||||
command: invoke worker
|
||||
command: invoke int.worker
|
||||
depends_on:
|
||||
- inventree-dev-server
|
||||
volumes:
|
||||
|
@ -83,7 +83,7 @@ services:
|
||||
# If you wish to specify a particular InvenTree version, do so here
|
||||
image: inventree/inventree:${INVENTREE_TAG:-stable}
|
||||
container_name: inventree-worker
|
||||
command: invoke worker
|
||||
command: invoke int.worker
|
||||
depends_on:
|
||||
- inventree-server
|
||||
env_file:
|
||||
|
@ -287,7 +287,7 @@ function update_or_install() {
|
||||
# Run update as app user
|
||||
echo "# Updating InvenTree"
|
||||
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && pip install wheel"
|
||||
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke update | sed -e 's/^/# inv update| /;'"
|
||||
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke update | sed -e 's/^/# invoke update| /;'"
|
||||
|
||||
# Make sure permissions are correct again
|
||||
echo "# Set permissions for data dir and media: ${DATA_DIR}"
|
||||
|
@ -9,9 +9,9 @@ export SETUP_ENVS=PATH,APP_HOME,INVENTREE_MEDIA_ROOT,INVENTREE_STATIC_ROOT,INVEN
|
||||
|
||||
if test -f "${APP_HOME}/env/bin/pip"; then
|
||||
# Check if clear-generated is available
|
||||
if sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke clear-generated --help" > /dev/null 2>&1; then
|
||||
if sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke int.clear-generated --help" > /dev/null 2>&1; then
|
||||
echo "# Clearing precompiled files"
|
||||
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke clear-generated"
|
||||
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke int.clear-generated"
|
||||
else
|
||||
echo "# Clearing precompiled files - skipping"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user