feat: implement darwin launch agent (#192)
* feat: sketch out periodic command * feat: sketch out periodic command for macOS * feat: implement darwin's launch agent * refactor: better way to run on darwin Make sure we have code that builds on all platforms. * fix(run): max 10 URLs with darwin in unattended mode * feat: add support for seeing/streaming logs * feat: implement the status command and add usage hints * feat(periodic): run onboarding if needed * fix: no too confusing function names * fix: s/periodic/autorun/ Discussed earlier this morning with @hellais. * fix: we cannot show logs before Big Sur Bug reported by @hellais.
This commit is contained in:
parent
6fbad8555f
commit
504a4e79d4
7 changed files with 334 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
|||
package run
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/alecthomas/kingpin"
|
||||
"github.com/apex/log"
|
||||
"github.com/fatih/color"
|
||||
|
|
@ -74,6 +76,13 @@ func init() {
|
|||
|
||||
unattendedCmd := cmd.Command("unattended", "")
|
||||
unattendedCmd.Action(func(_ *kingpin.ParseContext) error {
|
||||
if runtime.GOOS == "darwin" {
|
||||
// Until we have enabled the check-in API we're called every
|
||||
// hour on darwin and we need to self throttle.
|
||||
// TODO(bassosimone): switch to check-in and remove this hack.
|
||||
const veryFew = 10
|
||||
probe.Config().Nettests.WebsitesURLLimit = veryFew
|
||||
}
|
||||
return functionalRun(func(name string, gr nettests.Group) bool {
|
||||
return gr.UnattendedOK == true
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue