This commit is contained in:
wangjinlei
2026-04-17 09:51:09 +08:00
parent e9a354c663
commit 4417a7ea28
5 changed files with 314 additions and 41 deletions

View File

@@ -85,13 +85,14 @@ class ExpertFinder extends Base
}
/**
* 启动国家解析:找到第一个缺 country 的专家推入队列,
* 队列处理完后会自动链式找下一个,直到全部处理完。
* 只需调一次即可。
* 启动国家解析:同时启动两条链,分别用不同模型并行处理。
* 只需调一次,两条链各自链式执行直到全部处理完。
*/
public function batchFillCountry(){
$service = new ExpertFinderService();
$started = $service->enqueueNextCountryFill(0);
$chain1 = $service->enqueueNextCountryFill(0, 'FetchExpertCity', '');
$chain2 = $service->enqueueNextCountryFill(0, 'FetchExpertCity1', 'http://125.39.141.154:10002/v1/chat/completions');
$pending = Db::name('expert')
->where('affiliation', '<>', '')
@@ -100,7 +101,8 @@ class ExpertFinder extends Base
->count();
return jsonSuccess([
'started' => $started,
'chain1_started' => $chain1,
'chain2_started' => $chain2,
'pending' => $pending,
]);
}