feat: Implementa duas conexões Oracle simultâneas

- Oracle LOCAL (Docker): Para salvar TB_RANKING_CONSULTOR
- Oracle REMOTO (CAPES): Para ler SUCUPIRA_PAINEL.VM_COORDENADOR
- ConsultorRepositoryImpl usa oracle_remote para buscar PPG
- RankingRepository usa oracle_local para salvar ranking
- ProcessarRankingJob recebe ambos os clientes
- Componente B agora está preparado para funcionar

Nota: Elasticsearch precisa ser acessível da rede CAPES
This commit is contained in:
Frederico Castro
2025-12-10 04:21:17 -03:00
parent f69bcd928c
commit e11cdcd083
5 changed files with 70 additions and 15 deletions

View File

@@ -14,13 +14,15 @@ class ProcessarRankingJob:
def __init__(
self,
es_client: ElasticsearchClient,
oracle_client: OracleClient,
oracle_remote_client: OracleClient,
oracle_local_client: OracleClient,
ranking_repo: RankingOracleRepository,
):
self.es_client = es_client
self.oracle_client = oracle_client
self.oracle_remote_client = oracle_remote_client
self.oracle_local_client = oracle_local_client
self.ranking_repo = ranking_repo
self.consultor_repo = ConsultorRepositoryImpl(es_client, oracle_client)
self.consultor_repo = ConsultorRepositoryImpl(es_client, oracle_remote_client)
self.calculador = CalculadorPontuacao()
async def executar(self, limpar_antes: bool = True) -> Dict[str, Any]: