dipex 7.1.3__tar.gz → 7.2.1__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.
- {dipex-7.1.3 → dipex-7.2.1}/PKG-INFO +1 -1
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/main.py +11 -2
- {dipex-7.1.3 → dipex-7.2.1}/pyproject.toml +1 -1
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/__init__.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/config.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/gql_lora_cache_async.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/lc_for_jobs_db.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/lora_cache.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/sql_export.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/sql_table_defs.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/sql_url.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/sql_export/trigger.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/exporters/utils/priority_by_class.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/__init__.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/__init__.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_common.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_exceptions.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_jinja_filters.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_life_cycle.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_logger.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_reader.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_sync.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_template_engine.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_templates.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/ad_writer.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/mo_to_ad_sync.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/payloads.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/read_ad_conf_settings.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/sync_mo_uuid_to_ad.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/test_connectivity.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/__init__.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/mocks.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/name_simulator.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_ad_common.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_ad_jinja_filters.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_ad_life_cycle.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_ad_logger.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_ad_reader.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_ad_sync.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_ad_writer.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_dot_mapping.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_first_included.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_location_element.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_mo_data_source.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_mo_to_ad_sync.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_morestsource.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_read_ad_conf_settings.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_recursive_dict_update.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_sync_mo_uuid_to_ad.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_usernames.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/tests/test_utils.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/user_names.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/username_rules/method_2.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/ad_integration/utils.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/dawa_helper.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/clear_and_import_opus.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/opus_check_dar_adresses.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/opus_diff_import.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/opus_exceptions.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/opus_file_reader.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/opus_helpers.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/opus_reimport_one.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/org_tree_print/main.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/payloads.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/tests/test_opus_diff_import.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/tests/test_opus_file_reader.py +0 -0
- {dipex-7.1.3 → dipex-7.2.1}/integrations/opus/tests/test_opus_helpers.py +0 -0
|
@@ -15,6 +15,7 @@ from uuid import UUID
|
|
|
15
15
|
from fastapi import APIRouter
|
|
16
16
|
from fastapi import Depends
|
|
17
17
|
from fastapi import FastAPI
|
|
18
|
+
from fastapi import HTTPException
|
|
18
19
|
from fastramqpi.config import Settings as FastRAMQPISettings
|
|
19
20
|
from fastramqpi.depends import from_user_context
|
|
20
21
|
from fastramqpi.events import Event
|
|
@@ -45,6 +46,8 @@ from .sql_table_defs import Leder
|
|
|
45
46
|
from .sql_table_defs import LederAnsvar
|
|
46
47
|
from .sql_table_defs import Orlov
|
|
47
48
|
from .sql_table_defs import Tilknytning
|
|
49
|
+
from .trigger import lock_actual
|
|
50
|
+
from .trigger import lock_historic
|
|
48
51
|
from .trigger import trigger_router
|
|
49
52
|
|
|
50
53
|
logger = logging.getLogger(__name__)
|
|
@@ -274,6 +277,9 @@ async def trigger_actual_state_event(
|
|
|
274
277
|
event: Event[UUID],
|
|
275
278
|
sql_exporter: SqlExport,
|
|
276
279
|
) -> None:
|
|
280
|
+
if lock_actual.locked():
|
|
281
|
+
# Ensures we don't miss updates when data from the full export is swaped from the temporary tables
|
|
282
|
+
raise HTTPException(503, "Full export running, retry event later")
|
|
277
283
|
handle_function = handle_function_map[mo_type]
|
|
278
284
|
await handle_function(uuid=event.subject, sql_exporter=sql_exporter)
|
|
279
285
|
|
|
@@ -284,6 +290,9 @@ async def trigger_historic_event(
|
|
|
284
290
|
event: Event[UUID],
|
|
285
291
|
sql_exporter: SqlExportHistoric,
|
|
286
292
|
) -> None:
|
|
293
|
+
if lock_historic.locked():
|
|
294
|
+
# Ensures we don't miss updates when data from the full export is swaped from the temporary tables
|
|
295
|
+
raise HTTPException(503, "Full historic export running, retry event later")
|
|
287
296
|
handle_function = handle_function_map[mo_type]
|
|
288
297
|
await handle_function(uuid=event.subject, sql_exporter=sql_exporter)
|
|
289
298
|
|
|
@@ -341,8 +350,8 @@ def create_app(**kwargs) -> FastAPI:
|
|
|
341
350
|
# "Disable" last run metric to avoid erroneous alerts; it does not make
|
|
342
351
|
# sense for an event-driven integration without a rundb.
|
|
343
352
|
dipex_last_success_timestamp.set_function(time.time)
|
|
344
|
-
|
|
345
|
-
|
|
353
|
+
|
|
354
|
+
fastramqpi.get_app().include_router(trigger_router)
|
|
346
355
|
fastramqpi.add_context(settings=settings, sql_exporter=None)
|
|
347
356
|
|
|
348
357
|
app = fastramqpi.get_app()
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|