Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions go/worker/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ func statusCmd(ctx *cli.Context) error {
return err
}

fmt.Printf("Worker Ping:\n")
url := fmt.Sprintf("http://localhost:%s/status", common.Conf.Worker_port)
response, err := http.Get(url)
fmt.Printf("Worker Ping: ")
url := fmt.Sprintf("http://unix/status")
response, err := udsGet("/status")
if err != nil {
return fmt.Errorf("could not send GET to %s", url)
}
Expand All @@ -223,7 +223,7 @@ func statusCmd(ctx *cli.Context) error {
if err != nil {
return fmt.Errorf("failed to read body from GET to %s", url)
}
fmt.Printf(" %s => %s [%s]\n", url, body, response.Status)
fmt.Printf("%s => %s [%s]\n", url, body, response.Status)
fmt.Printf("\n")

return nil
Expand Down
11 changes: 7 additions & 4 deletions go/worker/event/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,14 @@ func Main() error {

// create handlers for servers
udsMux.HandleFunc(PID_PATH, HandleGetPid)
udsMux.HandleFunc(STATUS_PATH, Status)
udsMux.HandleFunc(STATS_PATH, Stats)
udsMux.HandleFunc(PPROF_MEM_PATH, PprofMem)
udsMux.HandleFunc(PPROF_CPU_START_PATH, PprofCpuStart)
udsMux.HandleFunc(PPROF_CPU_STOP_PATH, PprofCpuStop)

// add a status handler to portMUX so LambdaStore can pass health check
portMux.HandleFunc(STATUS_PATH, Status)
portMux.HandleFunc(STATS_PATH, Stats)
portMux.HandleFunc(PPROF_MEM_PATH, PprofMem)
portMux.HandleFunc(PPROF_CPU_START_PATH, PprofCpuStart)
portMux.HandleFunc(PPROF_CPU_STOP_PATH, PprofCpuStop)

// sock file is made in worker directory
sockPath := filepath.Join(common.Conf.Worker_dir, "ol.sock")
Expand Down
Loading