Skip to content

Commit

Permalink
fixed trimed lines
Browse files Browse the repository at this point in the history
  • Loading branch information
bkbilly committed Nov 30, 2022
1 parent 108ce7c commit 15f9e8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alarmcode/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def trimLogFile(self, lines):
""" Trims the log file in an interval of 24 hours to 1000 lines """

# lines = 1000 # Number of lines of logs to keep
repeat_every_n_sec = 86400 # 24 Hours
while True and lines is None and lines > 0:
repeat_every_n_sec = 3600 # 1 Hours
while True and lines > 0:
with open(self.logfile, 'r') as f:
data = f.readlines()
with open(self.logfile, 'w') as f:
Expand Down

0 comments on commit 15f9e8c

Please sign in to comment.