dynamic load room instance Args: room_id: the room id Returns: Room: the room instance
(cls, room_id: str)
| 277 | |
| 278 | @classmethod |
| 279 | def load(cls, room_id: str) -> Room: |
| 280 | """ |
| 281 | dynamic load room instance |
| 282 | Args: |
| 283 | room_id: the room id |
| 284 | Returns: |
| 285 | Room: the room instance |
| 286 | """ |
| 287 | room = cls._pool.get(room_id) |
| 288 | if room is not None: |
| 289 | return room |
| 290 | |
| 291 | room = cls(room_id) |
| 292 | cls._pool[room_id] = room |
| 293 | return room |
| 294 | |
| 295 | @classmethod |
| 296 | def upload_cache(cls, room_id: str) -> Room: |
no test coverage detected