This commit is contained in:
Sam Caldwell 2020-02-25 13:02:33 -05:00
parent dee43c7f19
commit f8c385e31d
1 changed files with 2 additions and 4 deletions

View File

@ -301,11 +301,9 @@ The JobManager then performs the job and, when finished, asserts
;; keep track of task managers, how many slots they say are open, and how many tasks we have assigned.
;; (Hashof TaskManagerID Nat)
(define/query-hash task-managers (task-manager $id $slots) id slots
#:on-add (begin (log "JM learns that ~a has ~v slots" id slots)
#;(requests-in-flight (hash-set (requests-in-flight) id 0))))
#:on-add (log "JM learns that ~a has ~v slots" id slots))
(field [waiting-tasks '()] ;; (Listof ID)
[requests-in-flight (hash)] ;; (Hashof ID Nat)
(field [requests-in-flight (hash)] ;; (Hashof ID Nat)
[assignments (hash)]) ;; (Hashof ID ID) request ID to manager ID
;; to better understand the supply of slots for each task manager, keep track of the number