remove passing RCLONE_PARALLEL_UPLOADS

This commit is contained in:
Radhakrishnan Sethuraman
2024-11-18 20:17:12 -06:00
parent 9f0ab3030f
commit 018063c413
3 changed files with 4 additions and 6 deletions

View File

@@ -228,6 +228,7 @@ a lot of failed downloads with the default downloader.
) )
@click.option( @click.option(
"--rclone-parallel-uploads", "--rclone-parallel-uploads",
"rclone-parallel-uploads",
default=1, default=1,
show_default=True, show_default=True,
envvar="RCLONE_PARALLEL_UPLOADS", envvar="RCLONE_PARALLEL_UPLOADS",

View File

@@ -75,8 +75,7 @@ class UnifiProtectBackup:
color_logging: bool = False, color_logging: bool = False,
download_rate_limit: float | None = None, download_rate_limit: float | None = None,
port: int = 443, port: int = 443,
use_experimental_downloader: bool = False, use_experimental_downloader: bool = False
rclone_parallel_uploads: int = 1,
): ):
"""Will configure logging settings and the Unifi Protect API (but not actually connect). """Will configure logging settings and the Unifi Protect API (but not actually connect).
@@ -270,8 +269,7 @@ class UnifiProtectBackup:
self.rclone_args, self.rclone_args,
self.file_structure_format, self.file_structure_format,
self._db, self._db,
self.color_logging, self.color_logging
self.rclone_parallel_uploads
) )
tasks.append(uploader.start()) tasks.append(uploader.start())

View File

@@ -35,7 +35,6 @@ class VideoUploader:
file_structure_format: str, file_structure_format: str,
db: aiosqlite.Connection, db: aiosqlite.Connection,
color_logging: bool, color_logging: bool,
rclone_parallel_uploads: int
): ):
"""Init. """Init.
@@ -99,7 +98,7 @@ class VideoUploader:
""" """
self.logger.info("Starting Uploader") self.logger.info("Starting Uploader")
rclone_transfers = self.rclone_parallel_uploads rclone_transfers = int(os.getenv('RCLONE_PARALLEL_UPLOADS', '1'))
self.current_events = [None] * rclone_transfers self.current_events = [None] * rclone_transfers
semaphore = asyncio.Semaphore(rclone_transfers) semaphore = asyncio.Semaphore(rclone_transfers)