mirror of
https://github.com/ep1cman/unifi-protect-backup.git
synced 2025-12-23 11:43:52 +00:00
remove passing RCLONE_PARALLEL_UPLOADS
This commit is contained in:
@@ -228,6 +228,7 @@ a lot of failed downloads with the default downloader.
|
||||
)
|
||||
@click.option(
|
||||
"--rclone-parallel-uploads",
|
||||
"rclone-parallel-uploads",
|
||||
default=1,
|
||||
show_default=True,
|
||||
envvar="RCLONE_PARALLEL_UPLOADS",
|
||||
|
||||
@@ -75,8 +75,7 @@ class UnifiProtectBackup:
|
||||
color_logging: bool = False,
|
||||
download_rate_limit: float | None = None,
|
||||
port: int = 443,
|
||||
use_experimental_downloader: bool = False,
|
||||
rclone_parallel_uploads: int = 1,
|
||||
use_experimental_downloader: bool = False
|
||||
):
|
||||
"""Will configure logging settings and the Unifi Protect API (but not actually connect).
|
||||
|
||||
@@ -270,8 +269,7 @@ class UnifiProtectBackup:
|
||||
self.rclone_args,
|
||||
self.file_structure_format,
|
||||
self._db,
|
||||
self.color_logging,
|
||||
self.rclone_parallel_uploads
|
||||
self.color_logging
|
||||
)
|
||||
tasks.append(uploader.start())
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ class VideoUploader:
|
||||
file_structure_format: str,
|
||||
db: aiosqlite.Connection,
|
||||
color_logging: bool,
|
||||
rclone_parallel_uploads: int
|
||||
):
|
||||
"""Init.
|
||||
|
||||
@@ -99,7 +98,7 @@ class VideoUploader:
|
||||
"""
|
||||
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
|
||||
semaphore = asyncio.Semaphore(rclone_transfers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user