from typing import Optional from ..logging.logger import get_logger from ..core.step1 import main as step1_main from ..core.step2 import main as step2_main log = get_logger("utils") async def run_step1(proxy: Optional[str] = None): try: log.info("Running step1") await step1_main(proxy) log.info("Step1 completed successfully") except Exception as e: log.exception(f"Error in step1: {str(e)}") raise async def run_step2(proxy: Optional[str] = None): try: log.info("Running step2") await step2_main(proxy) log.info("Step2 completed successfully") except Exception as e: log.exception(f"Error in step2: {str(e)}") raise