scruby 0.14.2__py3-none-any.whl → 0.14.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of scruby might be problematic. Click here for more details.

scruby/db.py CHANGED
@@ -360,11 +360,11 @@ class Scruby[T]:
360
360
  db_root: str = self.__db_root
361
361
  class_model: T = self.__class_model
362
362
  counter: int = 0
363
+ docs: list[T] = []
363
364
  with concurrent.futures.ThreadPoolExecutor(max_workers) as executor:
364
- results = []
365
365
  for branch_number in branch_numbers:
366
- if counter == limit_docs:
367
- break
366
+ if counter >= limit_docs:
367
+ return docs or None
368
368
  future = executor.submit(
369
369
  search_task_fn,
370
370
  branch_number,
@@ -375,9 +375,9 @@ class Scruby[T]:
375
375
  )
376
376
  doc = future.result(timeout)
377
377
  if doc is not None:
378
- results.append(doc)
378
+ docs.append(doc)
379
379
  counter += 1
380
- return results or None
380
+ return docs or None
381
381
 
382
382
  def collection_name(self) -> str:
383
383
  """Get collection name."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scruby
3
- Version: 0.14.2
3
+ Version: 0.14.3
4
4
  Summary: A fast key-value storage library.
5
5
  Project-URL: Homepage, https://github.com/kebasyaty/scruby
6
6
  Project-URL: Repository, https://github.com/kebasyaty/scruby
@@ -1,10 +1,10 @@
1
1
  scruby/__init__.py,sha256=GOVcjXmcOEDBbJQJDJlQq-x3M-VGJaMSN278EXsl2po,884
2
2
  scruby/aggregation.py,sha256=x_9ZJQHJHDISxRvddS5A2Hb0saIcfPTh1Veyf2KgX8A,2919
3
3
  scruby/constants.py,sha256=3LZfcxcuRqwzoB0-iogLMjKBZRdxfWJmTbyPwVRhQgY,1007
4
- scruby/db.py,sha256=_-2h6x1WkND52q-lDGYBFcQJ_7Mwxq3Rh4ZFfqIinsQ,21100
4
+ scruby/db.py,sha256=p-5sNZTMNRhNUnIksl4Ksjc7xMYwLRQ2CaS1vWR1e_g,21110
5
5
  scruby/errors.py,sha256=aHQri4LNcFVQrSHwjyzb1fL8O49SwjYEU4QgMOo4uyA,622
6
6
  scruby/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- scruby-0.14.2.dist-info/METADATA,sha256=vWhruXyj6cQyhPbXjMsUnz-j3L92eImp_R1QxX16BH0,10925
8
- scruby-0.14.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- scruby-0.14.2.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
10
- scruby-0.14.2.dist-info/RECORD,,
7
+ scruby-0.14.3.dist-info/METADATA,sha256=7MypNDVzms8gqeDzxkoKiWjc7_K-M6jefuEACPZqOB4,10925
8
+ scruby-0.14.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ scruby-0.14.3.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
10
+ scruby-0.14.3.dist-info/RECORD,,