예제 #1
0
파일: cli.py 프로젝트: MarnieShaw/opennem
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()
예제 #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)
예제 #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)
예제 #4
0
def schedule_live_tasks() -> None:
    if settings.workers_run:
        export_power(priority=PriorityType.live)
        export_flows()
예제 #5
0
파일: cli.py 프로젝트: MarnieShaw/opennem
def cmd_export_power() -> None:
    export_power(priority=PriorityType.live)
예제 #6
0
파일: __init__.py 프로젝트: zalihat/opennem
def schedule_power_weeklies() -> None:
    """
    Run weekly power outputs
    """
    export_power(priority=PriorityType.history, latest=True)
예제 #7
0
파일: __init__.py 프로젝트: zalihat/opennem
def schedule_live_tasks() -> None:
    export_power(priority=PriorityType.live)
예제 #8
0
def crawl_run_aemo_nemweb_dispatch_scada() -> None:
    run_crawl(AEMONNemwebDispatchScada)
    export_power(priority=PriorityType.live)
예제 #9
0
def export_power_task(priority: PriorityType, latest: bool) -> None:
    export_power(priority=priority, latest=latest)
예제 #10
0
def run_exports() -> None:
    run_energy_gapfill(days=30)
    run_aggregates_all()
    export_energy(latest=False)
    export_power(latest=False)