kopia lustrzana https://github.com/jprochazka/adsb-receiver
reverted some changes
reverted changes to purgeAircraft, purgeFlights, purgePositions as these are used as simple TRUE/FALSE tests. split the changes to purge_days_old to to using the more popular seeming fetchone()[0] and a seperate cast to intpull/448/head
rodzic
14a820e748
commit
dd43ba1b37
|
@ -64,21 +64,21 @@ while True:
|
|||
cursor.execute("SELECT value FROM adsb_settings WHERE name = 'purgeFlights'")
|
||||
row = cursor.fetchone()
|
||||
if row:
|
||||
purge_flights = int(row[0])
|
||||
purge_flights = row
|
||||
|
||||
purge_positions = False
|
||||
# MySQL and SQLite
|
||||
cursor.execute("SELECT value FROM adsb_settings WHERE name = 'purgePositions'")
|
||||
row = cursor.fetchone()
|
||||
if row:
|
||||
purge_positions = int(row[0])
|
||||
purge_positions = row
|
||||
|
||||
purge_days_old = False
|
||||
# MySQL and SQLite
|
||||
cursor.execute("SELECT value FROM adsb_settings WHERE name = 'purgeDaysOld'")
|
||||
row = cursor.fetchone()
|
||||
row = cursor.fetchone()[0]
|
||||
if row:
|
||||
purge_days_old = int(row[0])
|
||||
purge_days_old = int(row)
|
||||
|
||||
## Create the purge date from the age specified.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue