Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

Commit

Permalink
Merge pull request #245 from taskcluster/bug1588789
Browse files Browse the repository at this point in the history
Bug 1588789 - log workerReady the first time we're ready to call queue.claimWork
  • Loading branch information
petemoore committed Oct 16, 2019
2 parents 6e81dfb + 199921f commit 249d8ce
Show file tree
Hide file tree
Showing 182 changed files with 528 additions and 21,700 deletions.
8 changes: 4 additions & 4 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ tasks:
############## Linux amd64 Multiuser Build ###############
##########################################################

- provisionerId: pmoore-test
- provisionerId: aws-provisioner-v1
workerType: gwci-linux
metadata:
name: "Build/test 64 bit generic-worker (multiuser engine) on Ubuntu 17.04 VM"
Expand Down Expand Up @@ -592,7 +592,7 @@ tasks:
################ Linux amd64 Simple Build ################
##########################################################

- provisionerId: pmoore-test
- provisionerId: aws-provisioner-v1
workerType: gwci-linux
metadata:
name: "Build/test 64 bit generic-worker (simple engine) on Ubuntu 17.04 VM"
Expand Down Expand Up @@ -663,7 +663,7 @@ tasks:
################ Linux amd64 Docker Build ################
##########################################################

- provisionerId: pmoore-test
- provisionerId: aws-provisioner-v1
workerType: gwci-linux
metadata:
name: "Build/test 64 bit generic-worker (docker engine) on Ubuntu 17.04 VM"
Expand Down Expand Up @@ -734,7 +734,7 @@ tasks:
############## Check vendored dependencies ###############
##########################################################

- provisionerId: pmoore-test
- provisionerId: aws-provisioner-v1
workerType: gwci-linux
metadata:
name: "Run 'dep check' to ensure dependencies are up to date"
Expand Down
53 changes: 53 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down
61 changes: 61 additions & 0 deletions vendor/github.com/elastic/go-sysinfo/.appveyor.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/github.com/elastic/go-sysinfo/.editorconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions vendor/github.com/elastic/go-sysinfo/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions vendor/github.com/elastic/go-sysinfo/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/github.com/elastic/go-sysinfo/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 249d8ce

Please sign in to comment.