Skip to content

Commit

Permalink
add create of speedtest ok by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sagostin committed Jul 13, 2024
1 parent c63d194 commit c023179
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ func (a *Agent) Create(db *mongo.Database) error {
if err != nil {
return err
}
target := ProbeTarget{Target: "ok"}

s3 := Probe{Agent: a.ID, Type: ProbeType_SPEEDTEST, Config: ProbeConfig{Target: []ProbeTarget{target}}}
err = s3.Create(db)
if err != nil {
return err
}

fmt.Printf("created agent with id: %v\n", result.InsertedID)
return nil
Expand Down

0 comments on commit c023179

Please sign in to comment.