feat: disable unhealthy flow schedules #975
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Nova funcionalidade: Disable Unhealthy Flow Schedules
Contexto
Estamos adicionando o comando
disable_unhealthy_flow_schedules, que:run_dbtOrganização de pastas
A lógica do comando foi organizada em módulos por feature, dentro de
_disable_unhealthy_flow_schedules, para separar responsabilidades e facilitar manutenção e testes:Organização de pastas e fluxo
Diagrama visual do fluxo de execução
Notas visuais
➡️indica chamada de função / fluxo de execuçãoFlowServiceé o núcleo que orquestra a lógicaFlowDisableencapsula regra de negócio / validaçãoMakeClienté responsável por comunicação externa com GraphQLBenefícios desta primeira versão
Estrutura do código
1️⃣ Command Django
--dry-runpermite verificar sem alterar o estado2️⃣
constants.py3️⃣
datetime_utils.py4️⃣
models.pyTask,TaskRun,FlowRun,FlowDisableFlowDisable.validate()encapsula a regra de negócio5️⃣
service.pyMakeClient→ inicializa GraphQL clientFlowService→ funções de integração, queries e desativação de flowsdisable_unhealthy_flow_schedules(dry_run=False)6️⃣ Benefícios dessa primeira versão