77import click
88import uvicorn
99
10- from . config import Config
10+ from core_config import Config
1111
1212log = logging .getLogger (__name__ )
1313
1414
1515@click .group ()
1616def cli ():
17- """Video RSS Aggregator — Qwen3 intelligent video summarization."""
17+ """Video RSS Aggregator - Qwen3 intelligent video summarization."""
1818 logging .basicConfig (
1919 level = logging .INFO ,
2020 format = "%(asctime)s %(levelname)s [%(name)s] %(message)s" ,
@@ -34,8 +34,8 @@ def serve(bind: str | None):
3434 host , port = config .bind_host , config .bind_port
3535
3636 async def _run ():
37- from . api import create_app
38- from . pipeline import Pipeline
37+ from adapter_api import create_app
38+ from service_pipeline import Pipeline
3939
4040 pipeline = await Pipeline .create (config )
4141 app = create_app (pipeline , config .api_key )
@@ -48,7 +48,9 @@ async def _run():
4848
4949@cli .command ()
5050@click .option ("--feed-url" , envvar = "VRA_VERIFY_FEED_URL" , required = True )
51- @click .option ("--source" , envvar = "VRA_VERIFY_SOURCE" , required = True , help = "Audio path or URL" )
51+ @click .option (
52+ "--source" , envvar = "VRA_VERIFY_SOURCE" , required = True , help = "Audio path or URL"
53+ )
5254def verify (feed_url : str , source : str ):
5355 """Run end-to-end verification with real data."""
5456 import json
@@ -57,7 +59,7 @@ def verify(feed_url: str, source: str):
5759 config = Config .from_env ()
5860
5961 async def _run ():
60- from . pipeline import Pipeline
62+ from service_pipeline import Pipeline
6163
6264 pipeline = await Pipeline .create (config )
6365
@@ -76,7 +78,7 @@ async def _run():
7678 process_ms = int ((time .monotonic () - t2 ) * 1000 )
7779
7880 t3 = time .monotonic ()
79- rss = await pipeline .rss_feed ("Verification" , feed_url , "test" , 10 )
81+ await pipeline .rss_feed ("Verification" , feed_url , "test" , 10 )
8082 rss_ms = int ((time .monotonic () - t3 ) * 1000 )
8183
8284 total_ms = int ((time .monotonic () - t0 ) * 1000 )
@@ -85,8 +87,12 @@ async def _run():
8587 "feed_url" : feed_url ,
8688 "feed_items" : feed_report .item_count ,
8789 "processed_source" : source ,
88- "transcription_chars" : len (proc_report .transcription .text ) if proc_report .transcription else 0 ,
89- "summary_chars" : len (proc_report .summary .summary ) if proc_report .summary else 0 ,
90+ "transcription_chars" : len (proc_report .transcription .text )
91+ if proc_report .transcription
92+ else 0 ,
93+ "summary_chars" : len (proc_report .summary .summary )
94+ if proc_report .summary
95+ else 0 ,
9096 "total_ms" : total_ms ,
9197 "feed_ms" : feed_ms ,
9298 "process_ms" : process_ms ,
@@ -95,7 +101,3 @@ async def _run():
95101 print (json .dumps (report , indent = 2 ))
96102
97103 asyncio .run (_run ())
98-
99-
100- if __name__ == "__main__" :
101- cli ()
0 commit comments