jaaql-middleware-python 5.3.10__tar.gz → 5.3.12__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.
Files changed (78) hide show
  1. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/PKG-INFO +1 -1
  2. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/constants.py +1 -1
  3. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/documentation/documentation_shared.py +3 -3
  4. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/controller.py +3 -7
  5. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/model.py +21 -0
  6. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql_middleware_python.egg-info/PKG-INFO +1 -1
  7. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/LICENSE.txt +0 -0
  8. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/README.md +0 -0
  9. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/__init__.py +0 -0
  10. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/config/__init__.py +0 -0
  11. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/config/config-docker.ini +0 -0
  12. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/config/config-test.ini +0 -0
  13. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/config/config.ini +0 -0
  14. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/config_constants.py +0 -0
  15. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/db/__init__.py +0 -0
  16. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/db/db_interface.py +0 -0
  17. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/db/db_pg_interface.py +0 -0
  18. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/db/db_utils.py +0 -0
  19. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/db/db_utils_no_circ.py +0 -0
  20. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/documentation/__init__.py +0 -0
  21. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/documentation/documentation_internal.py +0 -0
  22. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/documentation/documentation_public.py +0 -0
  23. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/email/__init__.py +0 -0
  24. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/email/email_manager.py +0 -0
  25. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/email/email_manager_service.py +0 -0
  26. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/email/patch_ems.py +0 -0
  27. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/exceptions/__init__.py +0 -0
  28. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/exceptions/custom_http_status.py +0 -0
  29. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/exceptions/http_status_exception.py +0 -0
  30. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/exceptions/jaaql_interpretable_handled_errors.py +0 -0
  31. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/exceptions/not_yet_implement_exception.py +0 -0
  32. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/generated_constants.py +0 -0
  33. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/interpreter/__init__.py +0 -0
  34. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/interpreter/interpret_jaaql.py +0 -0
  35. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/jaaql.py +0 -0
  36. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/migrations/__init__.py +0 -0
  37. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/migrations/migrations.py +0 -0
  38. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/__init__.py +0 -0
  39. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/base_controller.py +0 -0
  40. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/base_model.py +0 -0
  41. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/controller_interface.py +0 -0
  42. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/exception_queries.py +0 -0
  43. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/generated_queries.py +0 -0
  44. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/handmade_queries.py +0 -0
  45. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/model_interface.py +0 -0
  46. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/mvc/response.py +0 -0
  47. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/openapi/__init__.py +0 -0
  48. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/openapi/swagger_documentation.py +0 -0
  49. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/patch.py +0 -0
  50. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/01.install_domains.generated.sql +0 -0
  51. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/02.install_super_user.exceptions.sql +0 -0
  52. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/03.install_super_user.handwritten.sql +0 -0
  53. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/04.install_jaaql_data_structures.generated.sql +0 -0
  54. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/05.install_static_data.generated.sql +0 -0
  55. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/06.install_jaaql.exceptions.sql +0 -0
  56. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/ZZZZ.generated_functions_views_and_permissions.sql +0 -0
  57. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/ZZZZ.reset_references.sql +0 -0
  58. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/scripts/swagger_template.html +0 -0
  59. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/services/__init__.py +0 -0
  60. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/services/cached_canned_query_service.py +0 -0
  61. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/services/migrations_manager_service.py +0 -0
  62. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/services/patch_mms.py +0 -0
  63. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/services/patch_shared_var_service.py +0 -0
  64. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/services/shared_var_service.py +0 -0
  65. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/utilities/__init__.py +0 -0
  66. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/utilities/bootstrap_secrets.py +0 -0
  67. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/utilities/cron.py +0 -0
  68. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/utilities/crypt_utils.py +0 -0
  69. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/utilities/options.py +0 -0
  70. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/utilities/utils.py +0 -0
  71. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/utilities/utils_no_project_imports.py +0 -0
  72. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql/utilities/vault.py +0 -0
  73. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql_middleware_python.egg-info/SOURCES.txt +0 -0
  74. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql_middleware_python.egg-info/dependency_links.txt +0 -0
  75. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql_middleware_python.egg-info/requires.txt +0 -0
  76. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/jaaql_middleware_python.egg-info/top_level.txt +0 -0
  77. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/setup.cfg +0 -0
  78. {jaaql_middleware_python-5.3.10 → jaaql_middleware_python-5.3.12}/setup.py +0 -0
@@ -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
@@ -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
  )
@@ -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)
@@ -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