Skip to content

Commit

Permalink
let uploader to upload compressed log first (when allowed) then proce…
Browse files Browse the repository at this point in the history
…ss uncompressed rlog (suggested by ku7)
  • Loading branch information
eFiniLan committed Dec 19, 2018
1 parent bd3a2d9 commit 98d7c45
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions selfdrive/loggerd/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,14 @@ def get_data_stats(self):
return dict(name_counts), total_size

def next_file_to_upload(self, with_video):
# try to upload log files first
# try to upload compressed log files first
for name, key, fn in self.gen_upload_files():
if name in ["rlog", "rlog.bz2"]:
if name == "rlog.bz2":
return (key, fn, 0)

# then upload those which are yet to be compressed
for name, key, fn in self.gen_upload_files():
if name == "rlog":
return (key, fn, 0)

if with_video:
Expand Down

0 comments on commit 98d7c45

Please sign in to comment.