|
|
@@ -19,7 +19,7 @@ def warn(msg, *args): |
|
|
|
fprintf(sys.stderr, "warning: " + msg + "\n", *args) |
|
|
|
|
|
|
|
class TimePeriod(object): |
|
|
|
_units = { 'h': ('hour', 60*60*24), |
|
|
|
_units = { 'h': ('hour', 60*60), |
|
|
|
'd': ('day', 60*60*24), |
|
|
|
'w': ('week', 60*60*24*7), |
|
|
|
'm': ('month', 60*60*24*30), |
|
|
@@ -228,7 +228,7 @@ def main(argv = None): |
|
|
|
keep = seconds_to_timestamp(streams[path].keep.seconds()) |
|
|
|
for i in intervals: |
|
|
|
total += i.end - i.start |
|
|
|
if total < keep: |
|
|
|
if total <= keep: |
|
|
|
continue |
|
|
|
remove_before = i.start + (total - keep) |
|
|
|
break |
|
|
|