diff --git a/main.go b/main.go index 2be9aa2b..151a5995 100644 --- a/main.go +++ b/main.go @@ -43,6 +43,8 @@ var ( reclaimEvery5Seconds = false // Current working directory of process cwd = CwdOrPanic() + // workerReady becomes true when it is able to call queue.claimWork for the first time + workerReady = false // Whether we are running under the aws provisioner configureForAWS bool // Whether we are running in GCP @@ -390,7 +392,6 @@ func RunWorker() (exitCode ExitCode) { if host, err := sysinfo.Host(); err == nil { logEvent("instanceBoot", nil, host.Info().BootTime) } - logEvent("workerReady", nil, time.Now()) err = setupExposer() if err != nil { @@ -541,6 +542,11 @@ func RunWorker() (exitCode ExitCode) { // ClaimWork queries the Queue to find a task. func ClaimWork() *TaskRun { + // only log workerReady the first time queue.claimWork is called + if !workerReady { + workerReady = true + logEvent("workerReady", nil, time.Now()) + } req := &tcqueue.ClaimWorkRequest{ Tasks: 1, WorkerGroup: config.WorkerGroup, diff --git a/uptime/update_darwin.go b/uptime/update_darwin.go new file mode 100644 index 00000000..2084c457 --- /dev/null +++ b/uptime/update_darwin.go @@ -0,0 +1,14 @@ +package main + +import ( + "log" + "syscall" +) + +func main() { + uptime, err := syscall.Sysctl("kern.boottime") + if err != nil { + log.Fatalf("%v", err) + } + log.Printf("Uptime: %v", uptime) +} diff --git a/worker_types/gwci-linux/screenshot.xwd b/worker_types/gwci-linux/screenshot.xwd new file mode 100644 index 00000000..4e9e066c Binary files /dev/null and b/worker_types/gwci-linux/screenshot.xwd differ