(txn, size)
| 95 | |
| 96 | def _set_keys(self, keys=None): |
| 97 | def find_keys(txn, size): |
| 98 | logger.warn("Traversing the database to find keys is slow. Your should specify the keys.") |
| 99 | keys = [] |
| 100 | with timed_operation("Loading LMDB keys ...", log_start=True), \ |
| 101 | get_tqdm(total=size) as pbar: |
| 102 | for k in self._txn.cursor(): |
| 103 | assert k[0] != b'__keys__' |
| 104 | keys.append(k[0]) |
| 105 | pbar.update() |
| 106 | return keys |
| 107 | |
| 108 | self.keys = self._txn.get(b'__keys__') |
| 109 | if self.keys is not None: |
nothing calls this directly
no test coverage detected