Add central material calibration support

This commit is contained in:
admin committed 2026-09-09 03:22:47 +02:00
1 parent 0210ced9e3
commit 73a6e60450
21 files changed
+848 -23

No files matched your search

@@ -26,6 +26,9 @@ from production_analytics.service.postgres_material import (
PostgresMaterialSnapshotWriter,
PostgresSettings,
)
from production_analytics.service.postgres_material_application import (
PostgresMaterialApplicationWriter,
)
class _ReportingStateStore:
@@ -88,6 +91,11 @@ def build_material_runner(
rotational_speed_variable_ids=calculation.rotational_speed_signal_refs,
specific_discharge_kg_per_rev_m=calculation.specific_discharge_kg_per_rev_m,
)
if calculation.process_application_calculation_id is not None:
source_options.update(
process_application_calculation_id=calculation.process_application_calculation_id,
application_writer=PostgresMaterialApplicationWriter(postgres_settings),
)
service = MaterialPollingService(
gateway=EnlyzeApiGateway(ExplorationClient(settings)),
state_store=_ReportingStateStore(JsonMaterialStateStore(state_directory)),