Spaces:
Runtime error
Runtime error
| import asyncio | |
| import sys | |
| import os | |
| # 将项目根目录加入 sys.path | |
| sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) | |
| from packages.core.logger import app_logger | |
| from packages.core.database import AsyncSessionLocal | |
| from packages.connectors.chile import ChileAduanasConnector | |
| async def run_chile_job(): | |
| """运行智利海关数据采集链路""" | |
| app_logger.info("Starting Chile data sync job...") | |
| async with AsyncSessionLocal() as session: | |
| connector = ChileAduanasConnector(session) | |
| await connector.run() | |
| if __name__ == "__main__": | |
| asyncio.run(run_chile_job()) | |