Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migração - desativa schedules projeto_subsidio_sppo #708

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 24 additions & 32 deletions pipelines/rj_smtr/projeto_subsidio_sppo/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,44 @@
"""

from prefect import Parameter, case, task
from prefect.tasks.control_flow import merge
from prefect.run_configs import KubernetesRun
from prefect.storage import GCS
from prefect.tasks.control_flow import merge
from prefect.tasks.prefect import create_flow_run, wait_for_flow_run
from prefect.utilities.edges import unmapped

# EMD Imports #

from pipelines.constants import constants
from pipelines.utils.tasks import (
rename_current_flow_run_now_time,
get_now_date,
get_current_flow_mode,
get_current_flow_labels,
)
from pipelines.utils.decorators import Flow
from pipelines.utils.execute_dbt_model.tasks import get_k8s_dbt_client

# SMTR Imports #

from pipelines.rj_smtr.constants import constants as smtr_constants

from pipelines.rj_smtr.tasks import (
from pipelines.rj_smtr.materialize_to_datario.flows import (
smtr_materialize_to_datario_viagem_sppo_flow,
)
from pipelines.rj_smtr.projeto_subsidio_sppo.tasks import (
check_param,
subsidio_data_quality_check,
)
from pipelines.rj_smtr.tasks import ( # get_local_dbt_client,; set_last_run_timestamp,
fetch_dataset_sha,
get_run_dates,
get_join_dict,
get_previous_date,
# get_local_dbt_client,
# set_last_run_timestamp,
get_run_dates,
)
from pipelines.rj_smtr.veiculo.flows import sppo_veiculo_dia
from pipelines.utils.decorators import Flow

from pipelines.rj_smtr.materialize_to_datario.flows import (
smtr_materialize_to_datario_viagem_sppo_flow,
# from pipelines.rj_smtr.schedules import every_day_hour_five, every_day_hour_seven
from pipelines.utils.execute_dbt_model.tasks import get_k8s_dbt_client, run_dbt_model
from pipelines.utils.tasks import (
get_current_flow_labels,
get_current_flow_mode,
get_now_date,
rename_current_flow_run_now_time,
)

from pipelines.rj_smtr.veiculo.flows import (
sppo_veiculo_dia,
)
# EMD Imports #

from pipelines.rj_smtr.schedules import every_day_hour_five, every_day_hour_seven
from pipelines.utils.execute_dbt_model.tasks import run_dbt_model

from pipelines.rj_smtr.projeto_subsidio_sppo.tasks import (
check_param,
subsidio_data_quality_check,
)
# SMTR Imports #


# Flows #

Expand Down Expand Up @@ -99,7 +91,7 @@
image=constants.DOCKER_IMAGE.value, labels=[constants.RJ_SMTR_AGENT_LABEL.value]
)

viagens_sppo.schedule = every_day_hour_five
# viagens_sppo.schedule = every_day_hour_five

with Flow(
"SMTR: Subsídio SPPO Apuração - Tratamento",
Expand Down Expand Up @@ -266,4 +258,4 @@
subsidio_sppo_apuracao.run_config = KubernetesRun(
image=constants.DOCKER_IMAGE.value, labels=[constants.RJ_SMTR_AGENT_LABEL.value]
)
subsidio_sppo_apuracao.schedule = every_day_hour_seven
# subsidio_sppo_apuracao.schedule = every_day_hour_seven
Loading