eaf-base-api 2.4.4__tar.gz → 2.4.5__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eaf_base_api
3
- Version: 2.4.4
3
+ Version: 2.4.5
4
4
  Summary: A base API for EchterAlsFake's Porn APIs
5
5
  Author-email: Johannes Habel <EchterAlsFake@proton.me>
6
6
  License: LGPLv3
@@ -658,8 +658,8 @@ class BaseCore:
658
658
  def initialize_session(self):
659
659
  limits = httpx.Limits(
660
660
  max_connections=getattr(self.config, "max_connections", 128),
661
- max_keepalive_connections=getattr(self.config, "max_keepalive", 32),
662
- keepalive_expiry=60.0,
661
+ max_keepalive_connections=getattr(self.config, "max_keepalive", 4),
662
+ keepalive_expiry=10,
663
663
  )
664
664
  ctx = ssl.create_default_context()
665
665
  if not self.config.verify_ssl:
@@ -870,6 +870,12 @@ class BaseCore:
870
870
 
871
871
  # 429: rate limited — respect Retry-After if present, else backoff and retry up to cap
872
872
  if status == 429:
873
+ if attempt == 0 or attempt == 1:
874
+ self.logger.info("Trying 429 bypass (Initializing new session...)")
875
+ del self.session
876
+ self.initialize_session()
877
+ continue
878
+
873
879
  wait = self._parse_retry_after(response)
874
880
  if wait is None:
875
881
  # fall back to exponential backoff proportional to attempt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eaf_base_api
3
- Version: 2.4.4
3
+ Version: 2.4.5
4
4
  Summary: A base API for EchterAlsFake's Porn APIs
5
5
  Author-email: Johannes Habel <EchterAlsFake@proton.me>
6
6
  License: LGPLv3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eaf_base_api"
7
- version = "2.4.4"
7
+ version = "2.4.5"
8
8
  description = "A base API for EchterAlsFake's Porn APIs"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.6"
File without changes
File without changes
File without changes
File without changes