illinois-cs241 / broadway

A distributed systems framework used running distributable workloads.
Other
18 stars 0 forks source link

Worker stats are reset when workers reconnect through websocket #17

Closed zhengyao-lin closed 4 years ago

zhengyao-lin commented 4 years ago

The problem is in the websocket handler https://github.com/illinois-cs241/broadway/blob/09abe4576061114255d1fb58b8c018ca12d8fb78/broadway/api/handlers/worker_ws.py#L38

It's creating a completely new model.WorkerNode every time which resets a bunch of fields to their initial values. The correct behavior should be first checking if there exists one node with the given id then only update altered fields (hostname, etc.)