BUGFIX: Take the latest info_collection got from machine instead of oldest
This commit is contained in:
parent
2c68cca5db
commit
13bf7107c9
|
@ -98,7 +98,7 @@ class Machine(object):
|
||||||
def __init__(self, monkey_guid):
|
def __init__(self, monkey_guid):
|
||||||
self.monkey_guid = str(monkey_guid)
|
self.monkey_guid = str(monkey_guid)
|
||||||
|
|
||||||
self.latest_system_info = mongo.db.telemetry.find({"telem_type":"system_info_collection", "monkey_guid": self.monkey_guid}).sort([("timestamp", 1)]).limit(1)
|
self.latest_system_info = mongo.db.telemetry.find({"telem_type":"system_info_collection", "monkey_guid": self.monkey_guid}).sort([("timestamp", -1)]).limit(1)
|
||||||
|
|
||||||
if self.latest_system_info.count() > 0:
|
if self.latest_system_info.count() > 0:
|
||||||
self.latest_system_info = self.latest_system_info[0]
|
self.latest_system_info = self.latest_system_info[0]
|
||||||
|
|
Loading…
Reference in New Issue