package taskrun import ( "fmt" "os" "time" ) const ( defaultLeaseTTL = 30 * time.Second defaultHeartbeatPeriod = 10 * time.Second ) func newWorkerID() string { host, err := os.Hostname() if err != nil || host == "" { host = "local" } return fmt.Sprintf("%s-%d-%d", host, os.Getpid(), time.Now().UnixNano()) }