refactor: remove all postgresql related
Some checks failed
Build Worker Base and Application Images / check-base-changes (push) Successful in 7s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Successful in 2m38s
Build Worker Base and Application Images / deploy-stack (push) Failing after 16s

This commit is contained in:
ziesorx 2025-11-03 17:20:19 +07:00
parent d1276885c0
commit eb9bedae67
6 changed files with 545 additions and 497 deletions

View file

@ -43,7 +43,7 @@ class BranchProcessor:
# Storage managers (set during initialization)
self.redis_manager = None
self.db_manager = None
# self.db_manager = None # Disabled - PostgreSQL operations moved to microservices
# Branch execution timeout (seconds)
self.branch_timeout = 30.0
@ -60,21 +60,21 @@ class BranchProcessor:
logger.info("BranchProcessor initialized")
async def initialize(self, pipeline_config: Any, redis_manager: Any, db_manager: Any) -> bool:
async def initialize(self, pipeline_config: Any, redis_manager: Any, db_manager: Any = None) -> bool:
"""
Initialize branch processor with pipeline configuration.
Args:
pipeline_config: Pipeline configuration object
redis_manager: Redis manager instance
db_manager: Database manager instance
db_manager: Database manager instance (deprecated, not used)
Returns:
True if successful, False otherwise
"""
try:
self.redis_manager = redis_manager
self.db_manager = db_manager
# self.db_manager = db_manager # Disabled - PostgreSQL operations moved to microservices
# Parse field mappings from parallelActions to enable dynamic field extraction
self._parse_branch_output_fields(pipeline_config)
@ -170,22 +170,25 @@ class BranchProcessor:
return
for action in pipeline_config.parallel_actions:
# Skip PostgreSQL actions - they are disabled
if action.type.value == 'postgresql_update_combined':
fields = action.params.get('fields', {})
# Parse each field template to extract branch_id and field_name
for db_field_name, template in fields.items():
# Template format: "{branch_id.field_name}"
if template.startswith('{') and template.endswith('}'):
var_name = template[1:-1] # Remove { }
if '.' in var_name:
branch_id, field_name = var_name.split('.', 1)
# Store the mapping
self.branch_output_fields[branch_id] = field_name
logger.info(f"[FIELD MAPPING] Branch '{branch_id}' → outputs field '{field_name}'")
logger.debug(f"[FIELD MAPPING] Skipping PostgreSQL action (disabled)")
continue # Skip field parsing for disabled PostgreSQL operations
# fields = action.params.get('fields', {})
#
# # Parse each field template to extract branch_id and field_name
# for db_field_name, template in fields.items():
# # Template format: "{branch_id.field_name}"
# if template.startswith('{') and template.endswith('}'):
# var_name = template[1:-1] # Remove { }
#
# if '.' in var_name:
# branch_id, field_name = var_name.split('.', 1)
#
# # Store the mapping
# self.branch_output_fields[branch_id] = field_name
#
# logger.info(f"[FIELD MAPPING] Branch '{branch_id}' → outputs field '{field_name}'")
logger.info(f"[FIELD MAPPING] Parsed {len(self.branch_output_fields)} branch output field mappings")