|
@@ -96,6 +96,8 @@ class Result(db.Model):
|
|
backref=db.backref('results', lazy='dynamic'))
|
|
backref=db.backref('results', lazy='dynamic'))
|
|
# In milliseconds
|
|
# In milliseconds
|
|
rtt = db.Column(db.Float)
|
|
rtt = db.Column(db.Float)
|
|
|
|
+ # Date at which the result was reported back to us
|
|
|
|
+ date = db.Column(db.DateTime)
|
|
|
|
|
|
def __init__(self, target_id, participant_uuid, rtt):
|
|
def __init__(self, target_id, participant_uuid, rtt):
|
|
target = Target.query.get_or_404(int(target_id))
|
|
target = Target.query.get_or_404(int(target_id))
|
|
@@ -104,6 +106,7 @@ class Result(db.Model):
|
|
self.target = target
|
|
self.target = target
|
|
self.participant = participant
|
|
self.participant = participant
|
|
self.rtt = float(rtt)
|
|
self.rtt = float(rtt)
|
|
|
|
+ self.date = datetime.now()
|
|
|
|
|
|
|
|
|
|
def init_db():
|
|
def init_db():
|