jaaql-middleware-python 5.3.10__py3-none-any.whl → 5.3.12__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.
jaaql/constants.py CHANGED
@@ -218,5 +218,5 @@ ROLE__dba = "dba"
218
218
 
219
219
  PROTOCOL__postgres = "postgresql://"
220
220
 
221
- VERSION = "5.3.10"
221
+ VERSION = "5.3.12"
222
222
 
@@ -166,7 +166,7 @@ DOCUMENTATION__submit = SwaggerDocumentation(
166
166
  method=REST__POST,
167
167
  arguments=ARG_RESP__allow_all,
168
168
  response=RES__allow_all,
169
- parallel_verification=False
169
+ parallel_verification=True
170
170
  )
171
171
  )
172
172
 
@@ -178,7 +178,7 @@ DOCUMENTATION__execute = SwaggerDocumentation(
178
178
  method=REST__POST,
179
179
  arguments=ARG_RESP__allow_all,
180
180
  response=RES__allow_all,
181
- parallel_verification=False
181
+ parallel_verification=True
182
182
  )
183
183
  )
184
184
 
@@ -190,6 +190,6 @@ DOCUMENTATION__call_proc = SwaggerDocumentation(
190
190
  method=REST__POST,
191
191
  arguments=ARG_RESP__allow_all,
192
192
  response=RES__allow_all,
193
- parallel_verification=False
193
+ parallel_verification=True
194
194
  )
195
195
  )
jaaql/mvc/controller.py CHANGED
@@ -102,20 +102,16 @@ class JAAQLController(BaseJAAQLController):
102
102
  def prepare(http_inputs: dict, account_id: str):
103
103
  return self.model.fetch_domains(http_inputs, account_id)
104
104
 
105
- # verification_hook (and ip_address, which follows it) are optional: the router only injects
106
- # verification_hook when the method's parallel_verification is True. With it False these verify
107
- # synchronously (verification_hook stays None), so there is no shared serial verifier thread to
108
- # wedge/queue-stall - which is what timed out @dba requests during a \wipe dbms rebuild.
109
105
  @self.publish_route('/submit', DOCUMENTATION__submit)
110
- def submit(http_inputs: dict, account_id: str, verification_hook: queue.Queue = None, ip_address: str = None):
106
+ def submit(http_inputs: dict, account_id: str, verification_hook: queue.Queue, ip_address: str):
111
107
  return self.model.submit(http_inputs, account_id, verification_hook=verification_hook, ip_address=ip_address)
112
108
 
113
109
  @self.publish_route('/execute', DOCUMENTATION__execute)
114
- def execute(http_inputs: dict, account_id: str, verification_hook: queue.Queue = None):
110
+ def execute(http_inputs: dict, account_id: str, verification_hook: queue.Queue):
115
111
  return self.model.execute(http_inputs, account_id, verification_hook=verification_hook)
116
112
 
117
113
  @self.publish_route('/call-proc', DOCUMENTATION__execute)
118
- def call_proc(http_inputs: dict, account_id: str, verification_hook: queue.Queue = None):
114
+ def call_proc(http_inputs: dict, account_id: str, verification_hook: queue.Queue):
119
115
  return self.model.call_proc(http_inputs, account_id, verification_hook=verification_hook)
120
116
 
121
117
  @self.publish_route('/internal/clean', DOCUMENTATION__clean)
jaaql/mvc/model.py CHANGED
@@ -1462,6 +1462,27 @@ WHERE
1462
1462
  # handed a dead connection whose commit silently fails. Runs once per wipe - no per-request cost.
1463
1463
  DBPGInterface.check_all_pools()
1464
1464
 
1465
+ if self.is_container:
1466
+ # A \wipe dbms reinstall leaves every gunicorn/gevent worker holding pooled connections to
1467
+ # the now-wiped databases. The gunicorn was_installed + child_exit mechanism restarts the
1468
+ # server to get fresh workers, but it fires on the NEXT worker exit - non-deterministic, so
1469
+ # build requests race the bounce (504s / connections lost mid-transaction). Instead disable
1470
+ # that path (remove the marker) and restart DETERMINISTICALLY just after this response is
1471
+ # sent, so the caller's post-wipe health-wait sees a clean down-then-up and every subsequent
1472
+ # request lands on a fresh worker. SIGQUIT to the gunicorn master (our parent) = the same
1473
+ # bounce child_exit performs; the container relaunches it.
1474
+ try:
1475
+ os.unlink(os.path.join("vault", "was_installed"))
1476
+ except FileNotFoundError:
1477
+ pass
1478
+ master_pid = os.getppid()
1479
+
1480
+ def _deterministic_restart():
1481
+ time.sleep(1) # let /internal/clean's 200 reach the caller before we bounce the server
1482
+ os.kill(master_pid, signal.SIGQUIT)
1483
+
1484
+ threading.Thread(target=_deterministic_restart, daemon=True).start()
1485
+
1465
1486
  def execute_migrations(self, connection: DBInterface):
1466
1487
  self.is_super_admin(connection)
1467
1488
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaaql-middleware-python
3
- Version: 5.3.10
3
+ Version: 5.3.12
4
4
  Summary: The jaaql package, allowing for rapid development and deployment of RESTful HTTP applications
5
5
  Home-page: https://github.com/JAAQL/JAAQL-middleware-python
6
6
  Author: Software Quality Measurement and Improvement bv
@@ -1,6 +1,6 @@
1
1
  jaaql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  jaaql/config_constants.py,sha256=puoR6jfbXw8oXXEfbYNn2ysGwgiGTyuDjOj7F8acsTE,470
3
- jaaql/constants.py,sha256=MSK-UafvG3mqqGKjWCStxlYcxoA1kdWQnBmYlfgpf7w,7356
3
+ jaaql/constants.py,sha256=XLfATx6ao2HHRGILKDzIk4BO7HJV-PIwd0RbhJQiTW0,7356
4
4
  jaaql/generated_constants.py,sha256=pxmpTux7rrjJH6iqLb-R8RKJ4t0CeoGdnspjH5DiWgU,11327
5
5
  jaaql/jaaql.py,sha256=bfiEW9A8PlZIVjDJd_LOhCLBL8flc_f7w0umR6EWbU4,6614
6
6
  jaaql/patch.py,sha256=VE4B6jA492NCIxNIewbynh92jxVulmRFtB9hNEe6q94,149
@@ -16,7 +16,7 @@ jaaql/db/db_utils_no_circ.py,sha256=xkEJCtjvaGVjO7L1YG7Ad-E31IrN1SzP9rBzZzOCqWI,
16
16
  jaaql/documentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  jaaql/documentation/documentation_internal.py,sha256=_tU92TI4Sd8AXj3b7-UOKCN1h4VR7SaakIv2ATC45Bo,22783
18
18
  jaaql/documentation/documentation_public.py,sha256=XU1Smw-1heWhCs-FDqTCTVCkAI2COHEy6fk2fhrwFN4,10932
19
- jaaql/documentation/documentation_shared.py,sha256=3oty0tIsWb30pQAy6h6oDZ_g2fdzmvVocey0E8PSg1Q,6657
19
+ jaaql/documentation/documentation_shared.py,sha256=gTw3rT2hC6LTlJMXnwmxhSTh3xUetIJPtIhldptXF84,6654
20
20
  jaaql/email/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  jaaql/email/email_manager.py,sha256=ublG0o2pvs019xxixNTi81kfYzqRglKUoqZOrAxqWN4,4450
22
22
  jaaql/email/email_manager_service.py,sha256=if8SnD1VdN2pKBwVsj8Y0aYgV3wiFJrHqZvArcXFVKY,46863
@@ -33,12 +33,12 @@ jaaql/migrations/migrations.py,sha256=XE46AzNmfAg9qiatIL_6ctjqiiuVMHUNEcVHhmuh4h
33
33
  jaaql/mvc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  jaaql/mvc/base_controller.py,sha256=I2EzDz3ace2f0Kjp9GNJk4A2cupKV4xINMZKbTJyYjI,39976
35
35
  jaaql/mvc/base_model.py,sha256=SJ2HOFNIqxhmNVIkt_zVtomVcwPBT3mxU8xCRbc7aVs,16916
36
- jaaql/mvc/controller.py,sha256=UTSD5x5MRE75QJ66OY1k9_Sku6926NLXeubV5LN1Icw,15228
36
+ jaaql/mvc/controller.py,sha256=UV4hWAFeTrpRjLgPQSKTRxrGMIrycwM6hi7ulfqk03o,14794
37
37
  jaaql/mvc/controller_interface.py,sha256=Wx8fA4lrqb_PPwkLNjJDxDloHB5JxmNt1Gv3SsDFqT4,274
38
38
  jaaql/mvc/exception_queries.py,sha256=lF65cj9KgJgRvyzxDjPDM05rHFSHF0jy1V8B77H9Rvo,7899
39
39
  jaaql/mvc/generated_queries.py,sha256=z1Jsyu-Y6D-Xd8LYvefzwv8C01NaBjHaHI7mcvv-WEk,72232
40
40
  jaaql/mvc/handmade_queries.py,sha256=kyXZ7L_AoxfcPR4u3r5So8khlRD6_sGQ39JnSAHDsEA,938
41
- jaaql/mvc/model.py,sha256=pPAu4GregD-XxVSCMjdqxhnTRoGJh6iqXqXF0yba4OA,133209
41
+ jaaql/mvc/model.py,sha256=J_9zBtSCgd0cuJ5HyTu-0-c7l8x9HX7snQXwwFbG6xs,134494
42
42
  jaaql/mvc/model_interface.py,sha256=YgAjaAiIQL1UtIJYgvkl_C3r6PVo-8Z3MXtwzyIwKnc,257
43
43
  jaaql/mvc/response.py,sha256=F4WvR9h1JcWF3Y6cj3n5HpVIqnwiMpNqfE8D29ZHbSE,860
44
44
  jaaql/openapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -66,8 +66,8 @@ jaaql/utilities/options.py,sha256=75M7-oSeY4wmHGz3-su_c36yf_Csv9HxvTG7aRlGR0A,49
66
66
  jaaql/utilities/utils.py,sha256=nVYVhuHtWSjdaJaXe9eC1Usja56NO-V9SoBIlcHAK8Q,5166
67
67
  jaaql/utilities/utils_no_project_imports.py,sha256=YwcskR15dAqKdEiuF8zGx-tzwWkclSGil_zm_qZ8ylU,4626
68
68
  jaaql/utilities/vault.py,sha256=DudyQNtMtaRLL71IGQX0AI16Tg1id98BHTCQPyUNkmE,2243
69
- jaaql_middleware_python-5.3.10.dist-info/licenses/LICENSE.txt,sha256=wr50eN0TnkrCSuNwyiI81FLZqmrW3q0JqRlVVQIrGA0,18134
70
- jaaql_middleware_python-5.3.10.dist-info/METADATA,sha256=k2DeO7btn6uP3nSL_Ac8dt9DpcpoPOTQSrDNcTg69gE,1977
71
- jaaql_middleware_python-5.3.10.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
72
- jaaql_middleware_python-5.3.10.dist-info/top_level.txt,sha256=k5aKVQy77bPyfyNHITvo5m3FqdSAiiXbjT5S9D9KzgU,6
73
- jaaql_middleware_python-5.3.10.dist-info/RECORD,,
69
+ jaaql_middleware_python-5.3.12.dist-info/licenses/LICENSE.txt,sha256=wr50eN0TnkrCSuNwyiI81FLZqmrW3q0JqRlVVQIrGA0,18134
70
+ jaaql_middleware_python-5.3.12.dist-info/METADATA,sha256=Vt6Jlpf5jb88RKGkLeCfBGXeL6NeAWCTbIUrEHfM9T8,1977
71
+ jaaql_middleware_python-5.3.12.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
72
+ jaaql_middleware_python-5.3.12.dist-info/top_level.txt,sha256=k5aKVQy77bPyfyNHITvo5m3FqdSAiiXbjT5S9D9KzgU,6
73
+ jaaql_middleware_python-5.3.12.dist-info/RECORD,,