Skip to content

Commit

Permalink
chore: merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
d116626 committed Oct 30, 2024
2 parents 994ba2b + 9248dea commit b693e76
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 17 deletions.
1 change: 1 addition & 0 deletions pipelines/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class constants(Enum):
# Agent labels
######################################
RJ_SMFP_AGENT_LABEL = "smfp"
RJ_LOCAL_IPLAN_AGENT_LABEL = "local-iplan"

######################################
# Other constants
Expand Down
2 changes: 1 addition & 1 deletion pipelines/egpweb_metas/dump_db_metas/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Database dumping flows for EGPWeb project
Database dumping flows for EGPWeb project..
"""

from copy import deepcopy
Expand Down
11 changes: 8 additions & 3 deletions pipelines/ergon/dump_db_ergon/flows.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# -*- coding: utf-8 -*-
"""
<<<<<<< HEAD
Database dumping flows for segovi project..........
=======
Database dumping flows for segovi project.....
>>>>>>> 9248dea3c889cc0dd0466f8c2e75465ca1dbf796
"""

from copy import deepcopy

from prefect.run_configs import KubernetesRun
from prefect.run_configs import DockerRun, KubernetesRun # noqa
from prefect.storage import GCS
from prefeitura_rio.pipelines_templates.dump_db.flows import flow as dump_sql_flow
from prefeitura_rio.pipelines_utils.prefect import set_default_parameters
Expand All @@ -21,13 +25,14 @@
dump_sql_ergon_flow.state_handlers = [handler_inject_bd_credentials, handler_initialize_sentry]
dump_sql_ergon_flow.name = "SMFP: ergon - Ingerir tabelas de banco SQL"
dump_sql_ergon_flow.storage = GCS(constants.GCS_FLOWS_BUCKET.value)
dump_sql_ergon_flow.run_config = KubernetesRun(
dump_sql_ergon_flow.run_config = DockerRun(
image=constants.DOCKER_IMAGE.value,
labels=[
constants.RJ_SMFP_AGENT_LABEL.value,
constants.RJ_LOCAL_IPLAN_AGENT_LABEL.value,
],
)


ergon_default_parameters = {
"db_database": "P01.PCRJ",
"db_host": "10.70.6.21",
Expand Down
5 changes: 3 additions & 2 deletions pipelines/ergon/dump_db_ergon/schedules.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# flake8: noqa: E501
"""
Schedules for the database dump pipeline.....
Schedules for the database dump pipeline.
"""

from datetime import datetime, timedelta
Expand Down Expand Up @@ -599,7 +599,7 @@
interval=timedelta(days=1),
start_date=datetime(2022, 11, 9, 22, 30, tzinfo=pytz.timezone("America/Sao_Paulo")),
labels=[
constants.RJ_SMFP_AGENT_LABEL.value,
constants.RJ_LOCAL_IPLAN_AGENT_LABEL.value,
],
db_database="P01.PCRJ",
db_host="10.70.6.21",
Expand All @@ -608,6 +608,7 @@
dataset_id="recursos_humanos_ergon",
infisical_secret_path="/db-ergon-prod",
table_parameters=ergon_queries,
agent_label=constants.RJ_SMFP_AGENT_LABEL.value,
)

ergon_monthly_update_schedule = Schedule(clocks=untuple(ergon_clocks))
2 changes: 1 addition & 1 deletion pipelines/ergon/dump_db_ergon_pericia_medica/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Database dumping flows for segovi project.
Database dumping flows for segovi project...
"""

from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion pipelines/ergon/materializa_funcionarios_saude/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Materialize Active SMS Employees from Ergon..
Materialize Active SMS Employees from Ergon....
"""

from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion pipelines/ergon_comlurb/dump_db_ergon_comlurb/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Database dumping flows for smfp ergon comlurb......
Database dumping flows for smfp ergon comlurb........
"""

from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion pipelines/fincon/dump_db_fincon/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Database dumping flows for SMFP FINCON.
Database dumping flows for SMFP FINCON...
"""

from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion pipelines/iptu_inad/dump_db_inadimplentes/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Database dumping flows.
Database dumping flows...
"""

from copy import deepcopy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Database dumping flows.............
Database dumping flows...............
"""

from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion pipelines/sigma/dump_db_compras_materiais/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Database dumping flows for SMFP SIGMA COMPRAS MATERIAIS.
Database dumping flows for SMFP SIGMA COMPRAS MATERIAIS...
"""

from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion pipelines/sigma/dump_db_sancao_fornecedor/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Database dumping flows for SMFP SIGMA system.
Database dumping flows for SMFP SIGMA system...
"""
from copy import deepcopy

Expand Down
4 changes: 4 additions & 0 deletions pipelines/templates/run_dbt_model/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# -*- coding: utf-8 -*-
"""
<<<<<<< HEAD
MATERIALIZA MODELOS DO DBT..............
=======
MATERIALIZA MODELOS DO DBT...
>>>>>>> 9248dea3c889cc0dd0466f8c2e75465ca1dbf796
"""

from copy import deepcopy
Expand Down
8 changes: 6 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dbt-bigquery = "^1.6.1"
google-cloud-storage = "^2.10.0"
pendulum = "^3.0.0"
prefect = "1.4.1"
prefeitura-rio = {git = "https://github.com/prefeitura-rio/prefeitura-rio", rev = "aeef75e29b7f7bbe83ab9252c50e87c0016e7e77", extras = [
prefeitura-rio = {git = "https://github.com/prefeitura-rio/prefeitura-rio", rev = "f04d50d26732705f77a56db0124d5828af6a501d", extras = [
"pipelines",
"pipelines-templates",
"actions",
Expand Down

0 comments on commit b693e76

Please sign in to comment.