Update event keys
This commit is contained in:
parent
4a66d7db52
commit
d68c33a10e
|
@ -100,12 +100,6 @@ func (c *Controller) Init(nt *mk.Nettest) error {
|
||||||
} else {
|
} else {
|
||||||
geoIPCountryPath = relPath
|
geoIPCountryPath = relPath
|
||||||
}
|
}
|
||||||
relPath, err = filepath.Rel(userHome, msmtPath)
|
|
||||||
if err != nil {
|
|
||||||
log.WithError(err).Error("msmtPath is not relative to the users home")
|
|
||||||
} else {
|
|
||||||
msmtPath = relPath
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Debugf("Chdir to: %s", userHome)
|
log.Debugf("Chdir to: %s", userHome)
|
||||||
if err := os.Chdir(userHome); err != nil {
|
if err := os.Chdir(userHome); err != nil {
|
||||||
|
@ -118,15 +112,16 @@ func (c *Controller) Init(nt *mk.Nettest) error {
|
||||||
IncludeIP: c.Ctx.Config.Sharing.IncludeIP,
|
IncludeIP: c.Ctx.Config.Sharing.IncludeIP,
|
||||||
IncludeASN: c.Ctx.Config.Sharing.IncludeASN,
|
IncludeASN: c.Ctx.Config.Sharing.IncludeASN,
|
||||||
IncludeCountry: c.Ctx.Config.Advanced.IncludeCountry,
|
IncludeCountry: c.Ctx.Config.Advanced.IncludeCountry,
|
||||||
LogLevel: "DEBUG",
|
LogLevel: "INFO",
|
||||||
|
|
||||||
ProbeCC: c.Ctx.Location.CountryCode,
|
ProbeCC: c.Ctx.Location.CountryCode,
|
||||||
ProbeASN: fmt.Sprintf("AS%d", c.Ctx.Location.ASN),
|
ProbeASN: fmt.Sprintf("AS%d", c.Ctx.Location.ASN),
|
||||||
ProbeIP: c.Ctx.Location.IP,
|
ProbeIP: c.Ctx.Location.IP,
|
||||||
|
|
||||||
DisableCollector: false,
|
DisableReportFile: false,
|
||||||
SoftwareName: "ooniprobe",
|
DisableCollector: false,
|
||||||
SoftwareVersion: version.Version,
|
SoftwareName: "ooniprobe",
|
||||||
|
SoftwareVersion: version.Version,
|
||||||
|
|
||||||
OutputPath: msmtPath,
|
OutputPath: msmtPath,
|
||||||
GeoIPCountryPath: geoIPCountryPath,
|
GeoIPCountryPath: geoIPCountryPath,
|
||||||
|
@ -173,7 +168,7 @@ func (c *Controller) Init(nt *mk.Nettest) error {
|
||||||
msmtTemplate.CountryCode = e.Value.ProbeCC
|
msmtTemplate.CountryCode = e.Value.ProbeCC
|
||||||
})
|
})
|
||||||
|
|
||||||
nt.On("status.measurement_started", func(e mk.Event) {
|
nt.On("status.measurement_start", func(e mk.Event) {
|
||||||
log.Debugf(colors.Red(e.Key))
|
log.Debugf(colors.Red(e.Key))
|
||||||
|
|
||||||
idx := e.Value.Idx
|
idx := e.Value.Idx
|
||||||
|
@ -207,7 +202,7 @@ func (c *Controller) Init(nt *mk.Nettest) error {
|
||||||
c.msmts[e.Value.Idx].UploadFailed(c.Ctx.DB, failure)
|
c.msmts[e.Value.Idx].UploadFailed(c.Ctx.DB, failure)
|
||||||
})
|
})
|
||||||
|
|
||||||
nt.On("status.measurement_uploaded", func(e mk.Event) {
|
nt.On("status.measurement_submission", func(e mk.Event) {
|
||||||
log.Debugf(colors.Red(e.Key))
|
log.Debugf(colors.Red(e.Key))
|
||||||
|
|
||||||
if err := c.msmts[e.Value.Idx].UploadSucceeded(c.Ctx.DB); err != nil {
|
if err := c.msmts[e.Value.Idx].UploadSucceeded(c.Ctx.DB); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user