Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90925fd321 |
@@ -2,7 +2,7 @@ name: archive-control-archive
|
||||
|
||||
services:
|
||||
archive-client:
|
||||
image: sodium/archive-clients:v0.1.11
|
||||
image: sodium/archive-clients:v0.1.12
|
||||
user: "1000:1000"
|
||||
restart: unless-stopped
|
||||
command: ["--config", "/etc/archive-control/client.toml"]
|
||||
|
||||
@@ -2,7 +2,7 @@ name: archive-control-cache
|
||||
|
||||
services:
|
||||
archive-client:
|
||||
image: sodium/archive-clients:v0.1.11
|
||||
image: sodium/archive-clients:v0.1.12
|
||||
user: "1001:1001"
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
|
||||
@@ -2,7 +2,7 @@ name: archive-control-cache
|
||||
|
||||
services:
|
||||
archive-client:
|
||||
image: sodium/archive-clients:v0.1.11
|
||||
image: sodium/archive-clients:v0.1.12
|
||||
user: "1001:1001"
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
|
||||
@@ -218,7 +218,7 @@ cache/archive routes according to policy.
|
||||
```yaml
|
||||
services:
|
||||
archive-client:
|
||||
image: sodium/archive-clients:v0.1.11
|
||||
image: sodium/archive-clients:v0.1.12
|
||||
user: "1001:1001"
|
||||
restart: unless-stopped
|
||||
command: ["archive-client", "--config", "/etc/archive-control/client.toml"]
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "archive-clients"
|
||||
version = "0.1.11"
|
||||
version = "0.1.12"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = ["protobuf==7.35.1", "websockets==16.0"]
|
||||
|
||||
|
||||
@@ -192,11 +192,19 @@ class SyncthingTransferObserver:
|
||||
for relative_path, expected_bytes in declared_files
|
||||
)
|
||||
observed_fraction = observed_bytes / total if total else 1.0
|
||||
# Folder completion remains useful when Syncthing has already
|
||||
# atomically published a file but still reports it in its need
|
||||
# queue; the allocated-byte estimate is needed for sparse temp
|
||||
# files that are pre-sized before their blocks arrive.
|
||||
fraction = min(observed_fraction, float(raw_fraction) / 100)
|
||||
# ``/db/completion`` is folder-wide. It can be near zero when a
|
||||
# route contains a freshly-created item even though the tracked
|
||||
# job's temporary payload has already received many blocks. For
|
||||
# an incomplete temporary file, its allocated blocks are the only
|
||||
# job-specific signal, so do not cap them with that unrelated
|
||||
# folder aggregate. Once every declared file is atomically
|
||||
# present, retain the completion value as a conservative guard
|
||||
# until the need queue has caught up.
|
||||
fraction = (
|
||||
observed_fraction
|
||||
if observed_fraction < 1.0
|
||||
else min(1.0, float(raw_fraction) / 100)
|
||||
)
|
||||
completed_bytes = int(total * fraction)
|
||||
if complete:
|
||||
fraction = 1.0
|
||||
|
||||
Reference in New Issue
Block a user