agentManager.go 447 B

1234567891011121314151617181920212223
  1. package server
  2. import "time"
  3. func (server *Server) agentManager() {
  4. // Start the great for-loop
  5. for {
  6. // Count the number of agents without a runnig task
  7. // Check if there are any new Tasks up for grabs
  8. // See if the task can be divided by the number of agents
  9. // If so, split
  10. // if not, split-1
  11. // Try again
  12. // Give agents task, maybe even look for the ones with the most CPUs
  13. // 😴
  14. time.Sleep(10 * time.Second)
  15. }
  16. }