mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-28 22:59:03 -06:00
Performance script, available as management command
[ci skip]
This commit is contained in:
@@ -19,7 +19,8 @@ for command in decrypt_documents \
|
||||
manage_superuser \
|
||||
convert_mariadb_uuid \
|
||||
prune_audit_logs \
|
||||
createsuperuser;
|
||||
createsuperuser \
|
||||
document_perf_benchmark;
|
||||
do
|
||||
echo "installing $command..."
|
||||
sed "s/management_command/$command/g" management_script.sh >"$PWD/rootfs/usr/local/bin/$command"
|
||||
|
||||
17
docker/rootfs/usr/local/bin/document_perf_benchmark
Executable file
17
docker/rootfs/usr/local/bin/document_perf_benchmark
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/command/with-contenv /usr/bin/bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
set -e
|
||||
|
||||
cd "${PAPERLESS_SRC_DIR}"
|
||||
|
||||
if [[ -n "${USER_IS_NON_ROOT}" ]]; then
|
||||
python3 manage.py document_perf_benchmark "$@"
|
||||
elif [[ $(id -u) == 0 ]]; then
|
||||
s6-setuidgid paperless python3 manage.py document_perf_benchmark "$@"
|
||||
elif [[ $(id -un) == "paperless" ]]; then
|
||||
python3 manage.py document_perf_benchmark "$@"
|
||||
else
|
||||
echo "Unknown user."
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user