jaaql-middleware-python 5.3.14__tar.gz → 5.3.18__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.14 → jaaql_middleware_python-5.3.18}/PKG-INFO +1 -1
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/constants.py +1 -1
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/model.py +26 -1
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql_middleware_python.egg-info/PKG-INFO +1 -1
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/LICENSE.txt +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/README.md +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/config/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/config/config-docker.ini +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/config/config-test.ini +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/config/config.ini +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/config_constants.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/db/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/db/db_interface.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/db/db_pg_interface.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/db/db_utils.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/db/db_utils_no_circ.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/documentation/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/documentation/documentation_internal.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/documentation/documentation_public.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/documentation/documentation_shared.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/email/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/email/email_manager.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/email/email_manager_service.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/email/patch_ems.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/exceptions/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/exceptions/custom_http_status.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/exceptions/http_status_exception.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/exceptions/jaaql_interpretable_handled_errors.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/exceptions/not_yet_implement_exception.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/generated_constants.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/interpreter/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/interpreter/interpret_jaaql.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/jaaql.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/migrations/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/migrations/migrations.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/base_controller.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/base_model.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/controller.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/controller_interface.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/exception_queries.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/generated_queries.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/handmade_queries.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/model_interface.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/response.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/openapi/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/openapi/swagger_documentation.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/patch.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/01.install_domains.generated.sql +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/02.install_super_user.exceptions.sql +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/03.install_super_user.handwritten.sql +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/04.install_jaaql_data_structures.generated.sql +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/05.install_static_data.generated.sql +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/06.install_jaaql.exceptions.sql +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/ZZZZ.generated_functions_views_and_permissions.sql +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/ZZZZ.reset_references.sql +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/scripts/swagger_template.html +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/services/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/services/cached_canned_query_service.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/services/migrations_manager_service.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/services/patch_mms.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/services/patch_shared_var_service.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/services/shared_var_service.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/__init__.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/bootstrap_secrets.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/cron.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/crypt_utils.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/options.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/utils.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/utils_no_project_imports.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/vault.py +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql_middleware_python.egg-info/SOURCES.txt +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql_middleware_python.egg-info/dependency_links.txt +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql_middleware_python.egg-info/requires.txt +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql_middleware_python.egg-info/top_level.txt +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/setup.cfg +0 -0
- {jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/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.18
|
|
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
|
|
@@ -27,6 +27,7 @@ from jaaql.exceptions.jaaql_interpretable_handled_errors import *
|
|
|
27
27
|
from jaaql.db.db_pg_interface import DBPGInterface, QUERY__dba_query_external
|
|
28
28
|
from jaaql.email.email_manager_service import EmailAttachment
|
|
29
29
|
from jaaql.mvc.base_model import BaseJAAQLModel, VAULT_KEY__jwt_crypt_key
|
|
30
|
+
from jaaql.utilities.bootstrap_secrets import get_or_seed_vault_secret
|
|
30
31
|
from jaaql.exceptions.http_status_exception import HttpStatusException, ERR__already_installed, HttpSingletonStatusException
|
|
31
32
|
from os.path import join
|
|
32
33
|
from jaaql.interpreter.interpret_jaaql import KEY_query, KEY_parameters
|
|
@@ -1489,7 +1490,7 @@ WHERE
|
|
|
1489
1490
|
master_pid = os.getppid()
|
|
1490
1491
|
|
|
1491
1492
|
def _deterministic_restart():
|
|
1492
|
-
time.sleep(
|
|
1493
|
+
time.sleep(0.2) # let /internal/clean's 200 reach the caller before we bounce the server
|
|
1493
1494
|
os.kill(master_pid, signal.SIGQUIT)
|
|
1494
1495
|
|
|
1495
1496
|
threading.Thread(target=_deterministic_restart, daemon=True).start()
|
|
@@ -1519,6 +1520,21 @@ WHERE
|
|
|
1519
1520
|
sql = self._lookup_cached_query(QUERY_CACHE_REF__health)
|
|
1520
1521
|
execute_supplied_statement_singleton(self.jaaql_lookup_connection, sql, as_objects=True)
|
|
1521
1522
|
|
|
1523
|
+
def install_on_bootup(self):
|
|
1524
|
+
# Called from the gunicorn master (docker/gunicorn_config.py, when_ready) while preload_app has
|
|
1525
|
+
# built this model and no worker has forked yet, so every worker starts already installed. The
|
|
1526
|
+
# migrations manager still installs over HTTP if this does not run, but that path installs inside
|
|
1527
|
+
# one worker and then has to bounce the whole master (child_exit) before the others can see it.
|
|
1528
|
+
if not self.is_container or self.has_installed:
|
|
1529
|
+
return
|
|
1530
|
+
super_db_password = get_or_seed_vault_secret(self.vault, VAULT_KEY__super_db_password, "SUPER_PASSWORD", generate_if_missing=True)
|
|
1531
|
+
jaaql_password = get_or_seed_vault_secret(self.vault, VAULT_KEY__jaaql_password, "JAAQL_PASSWORD", generate_if_missing=True)
|
|
1532
|
+
self.install(None, jaaql_password, super_db_password, self.install_key, True, do_reboot=False)
|
|
1533
|
+
# Nothing may carry a pooled connection across the fork; each worker opens its own in post_worker_init
|
|
1534
|
+
if self.jaaql_lookup_connection is not None:
|
|
1535
|
+
self.jaaql_lookup_connection.close()
|
|
1536
|
+
DBPGInterface.close_all_pools()
|
|
1537
|
+
|
|
1522
1538
|
def install(self, db_connection_string: str, jaaql_password: str, super_db_password: str, install_key: str, allow_uninstall: bool,
|
|
1523
1539
|
do_reboot: bool = True, jaaql_db_password: str = None):
|
|
1524
1540
|
if self.jaaql_lookup_connection is None:
|
|
@@ -1544,6 +1560,14 @@ WHERE
|
|
|
1544
1560
|
|
|
1545
1561
|
super_interface = create_interface(self.config, address, port, DB__jaaql, username, db_password)
|
|
1546
1562
|
conn = super_interface.get_conn()
|
|
1563
|
+
# A wipe leaves a window where background services (cron, EMS poller, auth verifier)
|
|
1564
|
+
# reconnect and can abandon an open transaction holding locks on the fresh jaaql tables.
|
|
1565
|
+
# The install DDL below would then queue behind that lock forever (no lock_timeout),
|
|
1566
|
+
# wedging /internal/clean into an nginx 504. Kill the strays and bound every lock wait so
|
|
1567
|
+
# a re-raced install fails fast (and can be retried) instead of hanging
|
|
1568
|
+
super_interface.execute_query(conn, "SELECT pg_terminate_backend(pid) FROM pg_stat_activity "
|
|
1569
|
+
"WHERE datname = current_database() AND pid <> pg_backend_pid()")
|
|
1570
|
+
super_interface.execute_query(conn, "SET lock_timeout TO '10s'")
|
|
1547
1571
|
super_interface.execute_script_file(conn, join(get_jaaql_root(), DIR__scripts, "01.install_domains.generated.sql"))
|
|
1548
1572
|
super_interface.execute_script_file(conn, join(get_jaaql_root(), DIR__scripts, "02.install_super_user.exceptions.sql"))
|
|
1549
1573
|
super_interface.execute_script_file(conn, join(get_jaaql_root(), DIR__scripts, "03.install_super_user.handwritten.sql"))
|
|
@@ -1560,6 +1584,7 @@ WHERE
|
|
|
1560
1584
|
|
|
1561
1585
|
self.jaaql_lookup_connection = create_interface(self.config, address, port, DB__jaaql, ROLE__jaaql, jaaql_db_password)
|
|
1562
1586
|
conn = self.jaaql_lookup_connection.get_conn()
|
|
1587
|
+
self.jaaql_lookup_connection.execute_query(conn, "SET lock_timeout TO '10s'")
|
|
1563
1588
|
self.jaaql_lookup_connection.execute_script_file(conn, join(get_jaaql_root(), DIR__scripts,
|
|
1564
1589
|
"04.install_jaaql_data_structures.generated.sql"))
|
|
1565
1590
|
self.jaaql_lookup_connection.execute_script_file(conn, join(get_jaaql_root(), DIR__scripts,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaaql-middleware-python
|
|
3
|
-
Version: 5.3.
|
|
3
|
+
Version: 5.3.18
|
|
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.14 → jaaql_middleware_python-5.3.18}/jaaql/config/config-docker.ini
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/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.14 → jaaql_middleware_python-5.3.18}/jaaql/db/db_pg_interface.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/db/db_utils_no_circ.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/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.14 → jaaql_middleware_python-5.3.18}/jaaql/email/email_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/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.14 → jaaql_middleware_python-5.3.18}/jaaql/generated_constants.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/interpreter/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/migrations/__init__.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/migrations/migrations.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/base_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/controller_interface.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/exception_queries.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/generated_queries.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/mvc/handmade_queries.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/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
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/services/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/services/patch_mms.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/crypt_utils.py
RENAMED
|
File without changes
|
{jaaql_middleware_python-5.3.14 → jaaql_middleware_python-5.3.18}/jaaql/utilities/options.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
|