Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
davedavemckay committed Oct 29, 2024
1 parent 319a716 commit 0bd15c8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions csd3-side/scripts/backup_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
prev_len = 0
while True:
with open(logcsv, 'r') as logc:
if len(logc.readlines()) > prev_len:
if len(logc.readlines()) - 1 > prev_len:
logc.seek(0)
prev_len = len(logc.readlines())
prev_len = len(logc.readlines()) - 1
logc.seek(0)
else:
continue
prog = 0
for line in logc:
if 'collated_' in line:
prog = len(line.split('"')[-2].split(','))
print(prog)
else:
prog = 1
print(prog)
pbar.update(prog - progress)
progress = prog
print(progress)
prog += len(line.split('"')[-2].split(','))
elif 'LOCAL_FOLDER' not in line:
prog += 1
print(prog)
pbar.update(prog - progress)
progress = prog
print(progress)

0 comments on commit 0bd15c8

Please sign in to comment.