Open mikhail opened 1 year ago
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 :+1: 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:
Status.Ready (3)
, and execute one per location in parallel.
Status.Running (4)
.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!