overthesun / simoc

A scalable model of an interactive, off-world community
https://ngs.simoc.space/
GNU General Public License v3.0
2 stars 2 forks source link

remove GameRunner #333

Closed granawkins closed 1 year ago

granawkins commented 1 year ago

This removes the GameRunner and GameRunnerManager classes, and instead moves the AgentModel stepping, batching and Redis-ing directly to tasks.py, and gets rid of about ~500 lines of code.

From what I can tell, GR and GRM worked together to balance multiple processes, catching things if they fail and queueing. However, a new GRM was instantiated for every user/session, and we only allow one sim per user/session, so this functionality was unused. Even if it was used, I believe celery is meant to handle this, which it still will.

I tested by opening 2 windows, logging in as different users, and launching 2 large sims at the same time. Both generated and set steps simultaneously, just like before the swap.