DB config
This commit is contained in:
parent
c91ac2486c
commit
36630b3273
@ -29,7 +29,7 @@ def main():
|
||||
if type_names[0] == "IN_MOVED_TO":
|
||||
if filename.endswith(ext):
|
||||
processFIT(filename)
|
||||
deleteFiles(filename)
|
||||
#deleteFiles(filename)
|
||||
else:
|
||||
os.remove(os.path.join(path, filename))
|
||||
|
||||
@ -45,7 +45,7 @@ def processFIT(filename):
|
||||
## Verarbeitung starten
|
||||
doAll(file)
|
||||
|
||||
writeDB()
|
||||
writeDB(filename)
|
||||
|
||||
|
||||
##
|
||||
@ -99,7 +99,7 @@ def doHealthFit(file, min_alt=0.0):
|
||||
fitData["total_ascent"] = round(float(ges_elev), 1)
|
||||
|
||||
|
||||
def writeDB():
|
||||
def writeDB(filename):
|
||||
global fitData, db_file
|
||||
|
||||
try:
|
||||
@ -121,6 +121,8 @@ def writeDB():
|
||||
print("Data inserted successfully into bike_drives table")
|
||||
cursor.close()
|
||||
|
||||
deleteFiles(filename)
|
||||
|
||||
except sqlite3.Error as error:
|
||||
print("Failed to insert data into sqlite table", error)
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user