Improved settings handling - fulltime service

This commit is contained in:
warwickh
2021-09-28 14:52:43 +10:00
parent cefe9d617f
commit 3a71d3c107
3 changed files with 52 additions and 68 deletions

View File

@ -70,6 +70,8 @@ class SQLiteDatabase(object):
last_update = self.get_value(artist_id, 'last_update')
record_age = round(time.time())-round(float(last_update[0][0]))
return record_age
except IndexError:
print("No existing record for artist %s" % artist_id)
except Exception as e:
print("get_record_age failed %s" % e)
return 0