Merge branch 'master' into implement-gui-integration

This commit is contained in:
abraunegg 2025-10-28 05:56:14 +11:00 committed by GitHub
commit a0186be736
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 0 deletions

View file

@ -181,6 +181,13 @@ if [ -n "${ONEDRIVE_FILE_FRAGMENT_SIZE:=""}" ]; then
ARGS=(--file-fragment-size ${ONEDRIVE_FILE_FRAGMENT_SIZE} ${ARGS[@]})
fi
# Tell client to use a specific threads value for parallel operations
if [ -n "${ONEDRIVE_THREADS:=""}" ]; then
echo "# We are specifying a thread value for the number of worker threads used for parallel upload and download operations"
echo "# Adding --threads ARG"
ARGS=(--threads ${ONEDRIVE_THREADS} ${ARGS[@]})
fi
if [ ${#} -gt 0 ]; then
ARGS=("${@}")
fi

View file

@ -1032,6 +1032,8 @@ _**Maximum Value:**_ `16`
_**Config Example:**_ `threads = "16"`
_**CLI Option Use:**_ `--threads '16'`
> [!NOTE]
> The default value of `8` threads is based on the average number of physical CPU cores found in consumer and workstation-grade Intel and AMD processors released from approximately 2012 through 2025. This includes laptops, desktops, and server-grade CPUs where 48 physical cores are typical.
>

View file

@ -342,6 +342,7 @@ docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/
| <B>ONEDRIVE_RUNAS_ROOT</B> | Controls if the Docker container should be run as the 'root' user instead of 'onedrive' user. Default is 0 | 1 |
| <B>ONEDRIVE_SYNC_ONCE</B> | Controls if the Docker container should be run in Standalone Mode. It will use Monitor Mode otherwise. Default is 0 | 1 |
| <B>ONEDRIVE_FILE_FRAGMENT_SIZE</B> | Controls the fragment size when uploading large files to Microsoft OneDrive. The value specified is in MB. Default is 10, Limit is 60 | 25 |
| <B>ONEDRIVE_THREADS</B> | Controls the value for the number of worker threads used for parallel upload and download operations. Default is 8, Limit is 16 | 4 |
### Environment Variables Usage Examples
**Verbose Output:**

View file

@ -306,6 +306,7 @@ podman run -it --name onedrive_work --user "${ONEDRIVE_UID}:${ONEDRIVE_GID}" \
| <B>ONEDRIVE_RUNAS_ROOT</B> | Controls if the Docker container should be run as the 'root' user instead of 'onedrive' user. Default is 0 | 1 |
| <B>ONEDRIVE_SYNC_ONCE</B> | Controls if the Docker container should be run in Standalone Mode. It will use Monitor Mode otherwise. Default is 0 | 1 |
| <B>ONEDRIVE_FILE_FRAGMENT_SIZE</B> | Controls the fragment size when uploading large files to Microsoft OneDrive. The value specified is in MB. Default is 10, Limit is 60 | 25 |
| <B>ONEDRIVE_THREADS</B> | Controls the value for the number of worker threads used for parallel upload and download operations. Default is 8, Limit is 16 | 4 |
### Environment Variables Usage Examples
**Verbose Output:**

View file

@ -352,6 +352,10 @@ Specify the local directory used for synchronisation to OneDrive.
\fB\-\-synchronize\fR
Perform a synchronisation with Microsoft OneDrive (DEPRECATED).
.TP
\fB\-\-threads\fR \fIARG\fR
Specify a value for the number of worker threads used for parallel upload and download operations.
.TP
\fB\-\-upload-only\fR
Replicate the locally configured sync_dir state to OneDrive, by only uploading local changes to OneDrive. Do not download changes from OneDrive.

View file

@ -1357,6 +1357,9 @@ class ApplicationConfig {
"sync-root-files",
"Sync all files in sync_dir root when using sync_list",
&boolValues["sync_root_files"],
"threads",
"Specify a value for the number of worker threads used for parallel upload and download operations",
&longValues["threads"],
"upload-only",
"Replicate the locally configured sync_dir state to OneDrive, by only uploading local changes to OneDrive. Do not download changes from OneDrive",
&boolValues["upload_only"],