jaaql-middleware-python 5.3.9__tar.gz → 5.3.11__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.
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/PKG-INFO +1 -1
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/constants.py +1 -1
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/db/db_utils_no_circ.py +19 -7
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/model.py +21 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql_middleware_python.egg-info/PKG-INFO +1 -1
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/LICENSE.txt +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/README.md +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/config/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/config/config-docker.ini +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/config/config-test.ini +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/config/config.ini +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/config_constants.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/db/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/db/db_interface.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/db/db_pg_interface.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/db/db_utils.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/documentation/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/documentation/documentation_internal.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/documentation/documentation_public.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/documentation/documentation_shared.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/email/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/email/email_manager.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/email/email_manager_service.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/email/patch_ems.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/exceptions/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/exceptions/custom_http_status.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/exceptions/http_status_exception.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/exceptions/jaaql_interpretable_handled_errors.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/exceptions/not_yet_implement_exception.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/generated_constants.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/interpreter/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/interpreter/interpret_jaaql.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/jaaql.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/migrations/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/migrations/migrations.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/base_controller.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/base_model.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/controller.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/controller_interface.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/exception_queries.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/generated_queries.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/handmade_queries.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/model_interface.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/response.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/openapi/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/openapi/swagger_documentation.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/patch.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/01.install_domains.generated.sql +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/02.install_super_user.exceptions.sql +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/03.install_super_user.handwritten.sql +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/04.install_jaaql_data_structures.generated.sql +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/05.install_static_data.generated.sql +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/06.install_jaaql.exceptions.sql +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/ZZZZ.generated_functions_views_and_permissions.sql +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/ZZZZ.reset_references.sql +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/swagger_template.html +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/services/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/services/cached_canned_query_service.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/services/migrations_manager_service.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/services/patch_mms.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/services/patch_shared_var_service.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/services/shared_var_service.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/__init__.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/bootstrap_secrets.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/cron.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/crypt_utils.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/options.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/utils.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/utils_no_project_imports.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/vault.py +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql_middleware_python.egg-info/SOURCES.txt +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql_middleware_python.egg-info/dependency_links.txt +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql_middleware_python.egg-info/requires.txt +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql_middleware_python.egg-info/top_level.txt +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/setup.cfg +0 -0
- {jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaaql-middleware-python
|
|
3
|
-
Version: 5.3.
|
|
3
|
+
Version: 5.3.11
|
|
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
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/db/db_utils_no_circ.py
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from jaaql.mvc.exception_queries import QUERY__fetch_application_schemas, KG__application_schema__application, KG__application__is_live, \
|
|
2
2
|
KG__application_schema__name, KEY__is_default
|
|
3
3
|
from queue import Queue
|
|
4
|
-
from jaaql.db.db_utils import execute_supplied_statement, create_interface_for_db, ERR__schema_invalid
|
|
5
|
-
from jaaql.exceptions.http_status_exception import HttpStatusException
|
|
4
|
+
from jaaql.db.db_utils import execute_supplied_statement, create_interface_for_db, ERR__schema_invalid, CONN_LOST__max_attempts
|
|
5
|
+
from jaaql.exceptions.http_status_exception import HttpStatusException, ConnectionLostError
|
|
6
6
|
from jaaql.interpreter.interpret_jaaql import InterpretJAAQL
|
|
7
7
|
from jaaql.constants import KEY__application, KEY__database, KEY__schema, KEY__role, DB__jaaql, \
|
|
8
8
|
KEY__read_only, KEY__prevent_unused_parameters
|
|
@@ -76,11 +76,23 @@ def submit(vault, config, db_crypt_key, jaaql_connection: DBInterface, inputs: d
|
|
|
76
76
|
|
|
77
77
|
prevent_unused = inputs.pop(KEY__prevent_unused_parameters) if KEY__prevent_unused_parameters in inputs else True
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
# A lost connection committed nothing, so re-running on a fresh connection is safe. \wipe dbms kills
|
|
80
|
+
# pooled connections, so a request landing on one dies at commit ("the connection is lost") - retry
|
|
81
|
+
# it. Only when transform owns the connection (conn is None); otherwise the caller manages the
|
|
82
|
+
# transaction and must handle the loss itself.
|
|
83
|
+
attempts = 0
|
|
84
|
+
while True:
|
|
85
|
+
attempts += 1
|
|
86
|
+
try:
|
|
87
|
+
ret = InterpretJAAQL(required_db, jaaql_connection
|
|
88
|
+
).transform(inputs, skip_commit=inputs.get(KEY__read_only), wait_hook=verification_hook,
|
|
89
|
+
encryption_key=db_crypt_key, conn=conn,
|
|
90
|
+
canned_query_service=cached_canned_query_service, prevent_unused_parameters=prevent_unused,
|
|
91
|
+
and_return_connection_mid_transaction=keep_alive_conn, prepare_statements=prepare_statements)
|
|
92
|
+
break
|
|
93
|
+
except ConnectionLostError:
|
|
94
|
+
if conn is not None or attempts >= CONN_LOST__max_attempts:
|
|
95
|
+
raise
|
|
84
96
|
|
|
85
97
|
if as_objects:
|
|
86
98
|
ret = objectify(ret, singleton=singleton)
|
|
@@ -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.
|
|
3
|
+
Version: 5.3.11
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/config/config-docker.ini
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/config/config-test.ini
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/db/db_pg_interface.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/documentation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/email/email_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/exceptions/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/generated_constants.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/interpreter/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/migrations/__init__.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/migrations/migrations.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/base_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/controller_interface.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/exception_queries.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/generated_queries.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/handmade_queries.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/mvc/model_interface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/scripts/swagger_template.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/services/patch_mms.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.9 → jaaql_middleware_python-5.3.11}/jaaql/utilities/crypt_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|