Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6bda5005c1 |
@@ -674,6 +674,7 @@ def resubmit_rejected_claims(
|
|||||||
|
|
||||||
attempts = 0
|
attempts = 0
|
||||||
ok = False
|
ok = False
|
||||||
|
was_skipped = False
|
||||||
while attempts < 3:
|
while attempts < 3:
|
||||||
attempts += 1
|
attempts += 1
|
||||||
if ssh is None:
|
if ssh is None:
|
||||||
@@ -691,7 +692,7 @@ def resubmit_rejected_claims(
|
|||||||
rs = sftp.stat(remote_path) # type: ignore[union-attr]
|
rs = sftp.stat(remote_path) # type: ignore[union-attr]
|
||||||
if rs.st_size == local_size:
|
if rs.st_size == local_size:
|
||||||
skipped += 1
|
skipped += 1
|
||||||
ok = True
|
was_skipped = True
|
||||||
break
|
break
|
||||||
except IOError:
|
except IOError:
|
||||||
pass # not on remote yet
|
pass # not on remote yet
|
||||||
@@ -710,12 +711,14 @@ def resubmit_rejected_claims(
|
|||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not ok:
|
if not ok and not was_skipped:
|
||||||
failed += 1
|
failed += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Audit (best-effort; if the DB is unavailable we still keep
|
# Audit + reconnect cadence apply only to real uploads.
|
||||||
# the file on the wire).
|
if not was_skipped:
|
||||||
|
# Audit (best-effort; if the DB is unavailable we still
|
||||||
|
# keep the file on the wire).
|
||||||
try:
|
try:
|
||||||
with db_mod.SessionLocal()() as session:
|
with db_mod.SessionLocal()() as session:
|
||||||
append_event(session, AuditEvent(
|
append_event(session, AuditEvent(
|
||||||
|
|||||||
Reference in New Issue
Block a user