Skip to content

Commit ee35f35

Browse files
authored
Merge pull request #498 from jhonderson/bug-db-cleanup-deleting-new-devices
Fix DB Clean plugin new devices deletion bug - thanks @jhonderson 🙏
2 parents 3f31434 + 7492a07 commit ee35f35

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

front/plugins/db_cleanup/script.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# 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
44

55
import os
66
import pathlib
@@ -35,10 +35,10 @@ def main():
3535

3636
values = parser.parse_args()
3737

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])
4242

4343
mylog('verbose', ['[DBCLNP] In script'])
4444

0 commit comments

Comments
 (0)