Skip to content

Commit

Permalink
protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
trevleon committed Jun 3, 2024
1 parent 929b26e commit 461a6d6
Show file tree
Hide file tree
Showing 7 changed files with 718 additions and 281 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: all go py clean build servers docker

PYTHON ?= python
PYTHON ?= python3

all: go py build docker

Expand Down
4 changes: 2 additions & 2 deletions go/cmd/globalscheduler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var mu sync.RWMutex

func main() {
ctx := context.Background()
//cfg = config.GetConfig() // Load configuration
cfg = config.GetConfig() // Load configuration
address := ":" + strconv.Itoa(cfg.Ports.GlobalScheduler) // Prepare the network address

lis, err := net.Listen("tcp", address)
Expand Down Expand Up @@ -68,7 +68,7 @@ type ObjClient interface {


func (s *server) Heartbeat(ctx context.Context, req *pb.HeartbeatRequest ) (*pb.StatusResponse, error) {
log.Printf("heartbeat from %v", req.NodeId)
//log.Printf("heartbeat from %v", req.NodeId)
mu.Lock()
s.status[req.NodeId] = HeartbeatEntry{timeReceived: time.Now(), numRunningTasks: req.RunningTasks, numQueuedTasks: req.QueuedTasks, avgRunningTime: req.AvgRunningTime, avgBandwidth: req.AvgBandwidth}
mu.Unlock()
Expand Down
Loading

0 comments on commit 461a6d6

Please sign in to comment.