MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / close_all

Method close_all

datastudio/utils/database.py:446–454  ·  view source on GitHub ↗

Close all shards.

(self)

Source from the content-addressed store, hash-verified

444 del self._envs[shard_id]
445
446 def close_all(self):
447 """Close all shards."""
448 with self._lock:
449 for shard_id in list(self._envs.keys()):
450 try:
451 self._envs[shard_id].close()
452 except Exception:
453 pass
454 self._envs.clear()
455
456 @classmethod
457 def close_all_instances(cls):

Callers 2

test_close_allMethod · 0.95
close_all_instancesMethod · 0.80

Calls 2

closeMethod · 0.80
clearMethod · 0.80

Tested by 1

test_close_allMethod · 0.76