Removing unsued code

This commit is contained in:
James Wells 2021-10-18 12:55:28 -07:00
parent 8a7842e6bc
commit f47b6846db
Signed by: jwells
GPG key ID: 73196D10B8E65666

View file

@ -14,11 +14,6 @@ import (
zmq "github.com/pebbe/zmq4"
)
// @TODO -- This was documented in the example, and I am unclear what it does
const (
WORKER_READY = "\001" // Signals worker is ready
)
var (
opsProcessed = promauto.NewCounter(prometheus.CounterOpts{
Name: "client_requests_recieved",
@ -83,11 +78,6 @@ LOOP:
log.Printf("[DEBUG] Worker message received: %s", msg)
workers = append(workers, identity)
// Forward message to client if it's not a READY
// if msg[0] != WORKER_READY {
// clientSock.SendMessage(msg)
// }
case clientSock:
// Get client request, route to first available worker
msg, err := s.RecvMessage(0)
@ -113,6 +103,7 @@ func unwrap(msg []string) (head string, tail []string) {
func answerClient(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
opsProcessed.Inc()
// fmt.Fprintf(w, "%v\n", r)
http.NotFound(w, r)
return
@ -122,7 +113,6 @@ func answerClient(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case http.MethodGet:
opsProcessed.Inc()
fmt.Fprintf(w, "%v\n", r)
// Handle the GET request...