Consider time as a default value in logs table

pull/18/head
Sami Mokaddem 2017-10-23 15:47:34 +02:00
parent d80aa1e7a3
commit 220e0985d5
3 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ max_img_rotation = 10
hours_spanned = 48
[Log]
fieldname_order=["time", "id", "category", "type", "value"]
fieldname_order=["id", "category", "type", "value"]
[RedisLog]
host=localhost

View File

@ -32,6 +32,7 @@ eventNumber = 0
class LogItem():
FIELDNAME_ORDER = []
FIELDNAME_ORDER.append("time")
for item in json.loads(cfg.get('Log', 'fieldname_order')):
FIELDNAME_ORDER.append(item)

View File

@ -80,7 +80,7 @@ def default_attribute(jsonattr):
print('sending', 'attribute')
jsonattr = jsonattr['Attribute']
to_push = []
for field in json.loads(cfg.get('Log', 'fieldname_order'))[1:]:
for field in json.loads(cfg.get('Log', 'fieldname_order')):
to_push.append(jsonattr[field])
#try to get coord