flexmeasures.data.services.reporting

Logic for queueing and running reporting jobs.

Functions

flexmeasures.data.services.reporting.create_reporting_job(reporter: Reporter, queue: str = 'reporting') Job

Queue a job that computes a report and stores its results.

flexmeasures.data.services.reporting.run_report_job(data_source_id: int, parameters: dict) list[dict]

Compute and store a report in a reporting worker.

If the report was triggered by an automation, the end of the report window is recorded upon success, so the automation’s next default window starts where this one ended. A failed report job therefore leaves no permanent gap in the reported periods.

Exceptions

exception flexmeasures.data.services.reporting.ReportWritesUncheckedSensor

Raised when a reporter returns results for a sensor that nobody’s permissions were checked against.