folio-migration-tools 1.10.1__py3-none-any.whl → 1.10.2__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.
@@ -2,6 +2,7 @@ import asyncio
2
2
  import copy
3
3
  import json
4
4
  import logging
5
+ import os
5
6
  import re
6
7
  import sys
7
8
  import traceback
@@ -249,6 +250,10 @@ class BatchPoster(MigrationTaskBase):
249
250
  self.num_posted = 0
250
251
  self.starting_record_count_in_folio: Optional[int] = None
251
252
  self.finished_record_count_in_folio: Optional[int] = None
253
+ # Create a semaphore to limit concurrent async requests
254
+ self.semaphore = asyncio.Semaphore(
255
+ int(os.environ.get("FOLIO_MAX_CONCURRENT_REQUESTS", 10))
256
+ )
252
257
 
253
258
  def do_work(self): # noqa: C901
254
259
  with open(
@@ -520,7 +525,8 @@ class BatchPoster(MigrationTaskBase):
520
525
 
521
526
  for attempt in range(retries):
522
527
  try:
523
- return await self.folio_client.folio_get_async(url, query_params=params)
528
+ async with self.semaphore:
529
+ return await self.folio_client.folio_get_async(url, query_params=params)
524
530
 
525
531
  except folioclient.FolioConnectionError as e:
526
532
  # Network/connection errors - always retry
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: folio-migration-tools
3
- Version: 1.10.1
3
+ Version: 1.10.2
4
4
  Summary: A tool allowing you to migrate data from legacy ILS:s (Library systems) into FOLIO LSP
5
5
  Keywords: FOLIO,ILS,LSP,Library Systems,MARC21,Library data
6
6
  Author: Theodor Tolstoy, Lisa Sjögren, Brooks Travis, Jeremy Nelson, Clinton Bradford
@@ -36,7 +36,7 @@ folio_migration_tools/marc_rules_transformation/rules_mapper_bibs.py,sha256=f62I
36
36
  folio_migration_tools/marc_rules_transformation/rules_mapper_holdings.py,sha256=zMmS2j4_HegVFlQMerTuZzH0WyGILJcRITzrGSeyll4,29236
37
37
  folio_migration_tools/migration_report.py,sha256=PpJWvtCWOz2RpFo0yhpWTwtdteBDmevGb6Tw8LLSsJE,4588
38
38
  folio_migration_tools/migration_tasks/__init__.py,sha256=ZkbY_yGyB84Ke8OMlYUzyyBj4cxxNrhMTwQlu_GbdDs,211
39
- folio_migration_tools/migration_tasks/batch_poster.py,sha256=Y8NfrvWVNasXxtIKIhi5BqMoxsNaU8kgm3LqTy4tId4,46416
39
+ folio_migration_tools/migration_tasks/batch_poster.py,sha256=p6iqX92OCapwLq8iQ3Rd7pi0J37ZmRvLa8xP3-yAKXw,46660
40
40
  folio_migration_tools/migration_tasks/bibs_transformer.py,sha256=Jelj-3KwdnPrk75fy82-9oty2QriwnrXtBcmx32G6qg,6560
41
41
  folio_migration_tools/migration_tasks/courses_migrator.py,sha256=jXeYkFd2JsMA4GhY_rmqwhlVuTrgK725Hv1EZhUchYE,7208
42
42
  folio_migration_tools/migration_tasks/holdings_csv_transformer.py,sha256=Q-N2f1fBfQbqtfSWwGRZ40oyijwO8fNgwSq62ANxGaM,22124
@@ -57,7 +57,7 @@ folio_migration_tools/transaction_migration/legacy_request.py,sha256=Kv7jpBIuZ_q
57
57
  folio_migration_tools/transaction_migration/legacy_reserve.py,sha256=qzw0okg4axAE_ezXopP9gFsQ_e60o0zh7zqRzFBSWHY,1806
58
58
  folio_migration_tools/transaction_migration/transaction_result.py,sha256=cTdCN0BnlI9_ZJB2Z3Fdkl9gpymIi-9mGZsRFlQcmDk,656
59
59
  folio_migration_tools/translations/en.json,sha256=pS7dhHmj4XBqTcFNIcqFgRMY557fQan1RomdNg6PtdA,40941
60
- folio_migration_tools-1.10.1.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
61
- folio_migration_tools-1.10.1.dist-info/entry_points.txt,sha256=mJRRiCNP9j7_NpVXamHEiW8pDEjWQs1vEqD89G354cM,79
62
- folio_migration_tools-1.10.1.dist-info/METADATA,sha256=95fZ1IAAAJaIkcVtc7zf8qfXVDHt3golF2WnEF8Z_hk,7207
63
- folio_migration_tools-1.10.1.dist-info/RECORD,,
60
+ folio_migration_tools-1.10.2.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
61
+ folio_migration_tools-1.10.2.dist-info/entry_points.txt,sha256=mJRRiCNP9j7_NpVXamHEiW8pDEjWQs1vEqD89G354cM,79
62
+ folio_migration_tools-1.10.2.dist-info/METADATA,sha256=7CB-1Rupuzp4AZyap1jBr6Z8_cTlUg6zLkfEVGPl1Qg,7207
63
+ folio_migration_tools-1.10.2.dist-info/RECORD,,