File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
# test script by running:
3
- # /home/pi/pialert/front/plugins/db_cleanup/script.py pluginskeephistory=250 hourstokeepnewdevice=48 daystokeepevents=90
3
+ # /home/pi/pialert/front/plugins/db_cleanup/script.py pluginskeephistory=250 hourstokeepnewdevice=48 daystokeepevents=90 pholuskeepdays=30
4
4
5
5
import os
6
6
import pathlib
@@ -35,10 +35,10 @@ def main():
35
35
36
36
values = parser .parse_args ()
37
37
38
- PLUGINS_KEEP_HIST = values .pluginskeephistory .split ('=' )[1 ]
39
- HRS_TO_KEEP_NEWDEV = values .hourstokeepnewdevice .split ('=' )[1 ]
40
- DAYS_TO_KEEP_EVENTS = values .daystokeepevents .split ('=' )[1 ]
41
- PHOLUS_DAYS_DATA = values .pholuskeepdays .split ('=' )[1 ]
38
+ PLUGINS_KEEP_HIST = int ( values .pluginskeephistory .split ('=' )[1 ])
39
+ HRS_TO_KEEP_NEWDEV = int ( values .hourstokeepnewdevice .split ('=' )[1 ])
40
+ DAYS_TO_KEEP_EVENTS = int ( values .daystokeepevents .split ('=' )[1 ])
41
+ PHOLUS_DAYS_DATA = int ( values .pholuskeepdays .split ('=' )[1 ])
42
42
43
43
mylog ('verbose' , ['[DBCLNP] In script' ])
44
44
You can’t perform that action at this time.
0 commit comments