You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the library to manage concurrent matches being executed in parallel. Imagine multiple tables for ping pong, or multiple baseball fields, parallel curling sheets, etc etc.
I'm envisioning metadata for Match objects that specify some parameter such as location_id. Is this the right approach? Would you accept a PR for this?
Understandable if the right solution here is to manage location independently of this library. Let me know!
The text was updated successfully, but these errors were encountered:
Understandable if the right solution here is to manage location independently of this library.
Yes, you're right. You should be handling this independently from the library 👍
When creating a stage, the library will create all the matches for you, by using the storage implementation you provided.
So if you implemented your own storage, you could add location_id on-the-fly. And the library won't know about it. For future match updates, the library will only do partial mutations of the matches, so your metadata will remain intact.
If you didn't implement a storage (or don't want to), you can use the in-memory storage implementation, add your metadata, then persist everything at once in your database. Or you should be able to create a new storage class which extends from JsonDatabase.
Manage concurrent matches being executed in parallel.
With this metadata, an approach would be to:
Get all the matches with Status.Ready (3), and execute one per location in parallel.
Note: You aren't forced to finish a round before starting the next one.
The matches that are executed in parallel are going to change to Status.Running (4).
Once a match is finished, it will update the status for the following matches automatically. At this moment, you can get all the matches with a Status.Ready (3) status again, and assign them to an available location.
I'm trying to use the library to manage concurrent matches being executed in parallel. Imagine multiple tables for ping pong, or multiple baseball fields, parallel curling sheets, etc etc.
I'm envisioning metadata for
Match
objects that specify some parameter such aslocation_id
. Is this the right approach? Would you accept a PR for this?Understandable if the right solution here is to manage location independently of this library. Let me know!
The text was updated successfully, but these errors were encountered: