refactor: pass experiment arguments using a struct (#983)
Closes https://github.com/ooni/probe/issues/2358.
This commit is contained in:
parent
c2ea0b4704
commit
a0dc65641d
76 changed files with 824 additions and 481 deletions
|
|
@ -66,10 +66,10 @@ func (m *Measurer) printprogress(
|
|||
}
|
||||
|
||||
// Run runs the measurement
|
||||
func (m *Measurer) Run(
|
||||
ctx context.Context, sess model.ExperimentSession,
|
||||
measurement *model.Measurement, callbacks model.ExperimentCallbacks,
|
||||
) error {
|
||||
func (m *Measurer) Run(ctx context.Context, args *model.ExperimentArgs) error {
|
||||
callbacks := args.Callbacks
|
||||
measurement := args.Measurement
|
||||
sess := args.Session
|
||||
const maxruntime = 300
|
||||
ctx, cancel := context.WithTimeout(ctx, maxruntime*time.Second)
|
||||
var (
|
||||
|
|
|
|||
Loading…
Reference in a new issue