lacuscore 1.12.0__py3-none-any.whl → 1.12.1__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.
lacuscore/lacuscore.py CHANGED
@@ -376,6 +376,10 @@ class LacusCore():
376
376
  logger.warning(f'Settings invalid: {e}')
377
377
  raise CaptureSettingsError('Invalid settings', e)
378
378
 
379
+ # If the class is initialized with max_retries below the one provided in the settings, we use the lowest value
380
+ # NOTE: make sure the variable is initialized *before* we raise any RetryCapture
381
+ max_retries = min([to_capture.max_retries, self.max_retries]) if to_capture.max_retries is not None else self.max_retries
382
+
379
383
  if to_capture.document:
380
384
  # we do not have a URL yet.
381
385
  document_as_bytes = b64decode(to_capture.document)
@@ -474,8 +478,6 @@ class LacusCore():
474
478
  cookie['path'] = '/'
475
479
  cookies.append(cookie)
476
480
 
477
- # If the class is initialized with max_retries below the one provided in the settings, we use the lowest value
478
- max_retries = min([to_capture.max_retries, self.max_retries]) if to_capture.max_retries is not None else self.max_retries
479
481
  try:
480
482
  logger.debug(f'Capturing {url}')
481
483
  stats_pipeline.sadd(f'stats:{today}:captures', url)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lacuscore
3
- Version: 1.12.0
3
+ Version: 1.12.1
4
4
  Summary: Core of Lacus, usable as a module
5
5
  Home-page: https://github.com/ail-project/LacusCore
6
6
  License: BSD-3-Clause
@@ -1,10 +1,10 @@
1
1
  lacuscore/__init__.py,sha256=aLBshQPT9IBDKn5qWrX9A_exqtLFPyLsQiPWdfpAFjA,537
2
2
  lacuscore/helpers.py,sha256=a7dwcNwwF04czQaGaVdcDrXbBJvAdGTJU7Gi4L_pNd4,10954
3
3
  lacuscore/lacus_monitoring.py,sha256=r6IaYuh6sMq43eOWdZx0fU8p4PWVZlqSD6nr6yOaTUU,2713
4
- lacuscore/lacuscore.py,sha256=dhcPUH2jMIJ5bUTWZ1qnrpgZak06MyDFjAu3xYPDMbc,41200
4
+ lacuscore/lacuscore.py,sha256=yK6cc70gQT8f8WlXRv2sA94Pk0-iDnzAOqqiRaGTWq4,41294
5
5
  lacuscore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  lacuscore/task_logger.py,sha256=2wDotU6r6vn-aKO8nZNdxSuisSj11LlcxuvW60qPL0Y,1909
7
- lacuscore-1.12.0.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
8
- lacuscore-1.12.0.dist-info/METADATA,sha256=CEvt7C_2WZ04gBvAdsNArv3RHhXZDwW35Nlsq7j3R3M,2806
9
- lacuscore-1.12.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
10
- lacuscore-1.12.0.dist-info/RECORD,,
7
+ lacuscore-1.12.1.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
8
+ lacuscore-1.12.1.dist-info/METADATA,sha256=iUjyt2WDOMHWN4JcMl5aBHS5AjKzdZ6_4ETlf8E6gYk,2806
9
+ lacuscore-1.12.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
10
+ lacuscore-1.12.1.dist-info/RECORD,,