Implement state tracking in database

This commit is contained in:
Arturo Filastò
2018-03-19 19:28:32 +01:00
parent 25c15dc3ab
commit 9f438ae068
5 changed files with 27 additions and 34 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ func init() {
for _, nt := range group.Nettests {
log.Debugf("Running test %T", nt)
msmtPath := filepath.Join(ctx.TempDir,
fmt.Sprintf("msmt-%s-%T.jsonl", nt,
fmt.Sprintf("msmt-%T-%s.jsonl", nt,
time.Now().UTC().Format(time.RFC3339Nano)))
ctl := nettests.NewController(nt, ctx, result, msmtPath)
+1 -1
View File
@@ -128,7 +128,7 @@ func CreateMeasurement(db *sqlx.DB, m Measurement, i string) (*Measurement, erro
(name, start_time,
asn, ip, country,
state, failure, report_file,
report_id, input, measurement_id,
report_id, input,
result_id)
VALUES (:name,:start_time,
:asn,:ip,:country,