Exemplo n.º 1
0
def cmd_export_all() -> None:
    run_energy_update_yesterday(days=2)
    refresh_material_views("mv_network_fueltech_days")
    refresh_material_views("mv_facility_45d")
    export_power()
    export_energy()
    export_all_monthly()
    export_all_daily()
Exemplo n.º 2
0
def run_tests() -> None:
    # network_schema = network_from_network_code("NEM")
    # scada_range = get_scada_range(network=network_schema)
    # bom_station = get_network_region_weather_station("NEM")

    export_map = get_export_map()

    nem_energy = (export_map.get_by_network_id("NEM").get_by_stat_type(
        StatType.energy).get_by_priority(
            PriorityType.monthly).get_by_network_region("NSW1"))

    export_energy(nem_energy.resources, latest=True)

    nem_power = (export_map.get_by_network_id("NEM").get_by_stat_type(
        StatType.power).get_by_priority(PriorityType.live))

    export_power(nem_power.resources)
Exemplo n.º 3
0
def run_tests() -> None:
    export_map = get_export_map()

    power = (export_map.get_by_network_id("NEM").get_by_stat_type(
        StatType.power).get_by_network_region("VIC1").get_by_priority(
            PriorityType.live))

    export_power(power.resources)

    energy_map = (export_map.get_by_network_id("NEM").get_by_stat_type(
        StatType.energy).get_by_priority(
            PriorityType.daily).get_by_network_region("NSW1").get_by_years(
                [2021]))

    if len(energy_map.resources):
        export_energy(energy_map.resources)

    energy_map = (export_map.get_by_network_id("NEM").get_by_stat_type(
        StatType.energy).get_by_priority(
            PriorityType.monthly).get_by_network_region("NSW1"))

    if len(energy_map.resources):
        export_energy(energy_map.resources)
Exemplo n.º 4
0
def schedule_live_tasks() -> None:
    if settings.workers_run:
        export_power(priority=PriorityType.live)
        export_flows()
Exemplo n.º 5
0
def cmd_export_power() -> None:
    export_power(priority=PriorityType.live)
Exemplo n.º 6
0
def schedule_power_weeklies() -> None:
    """
    Run weekly power outputs
    """
    export_power(priority=PriorityType.history, latest=True)
Exemplo n.º 7
0
def schedule_live_tasks() -> None:
    export_power(priority=PriorityType.live)
Exemplo n.º 8
0
def crawl_run_aemo_nemweb_dispatch_scada() -> None:
    run_crawl(AEMONNemwebDispatchScada)
    export_power(priority=PriorityType.live)
Exemplo n.º 9
0
def export_power_task(priority: PriorityType, latest: bool) -> None:
    export_power(priority=priority, latest=latest)
Exemplo n.º 10
0
def run_exports() -> None:
    run_energy_gapfill(days=30)
    run_aggregates_all()
    export_energy(latest=False)
    export_power(latest=False)