|
|
@@ -36,7 +36,7 @@ class CheckImageGenerationTasksCommand extends Command
|
|
|
// 执行50s
|
|
|
$time_start = time();
|
|
|
try {
|
|
|
- // 统计需要处理的任务数量(即梦AI的processing + 火山API的pending和processing)
|
|
|
+ // 统计需要处理的任务数量(即梦AI的processing + 火山API和GPT的pending和processing)
|
|
|
$jimengProcessingCount = DB::table('mp_generate_pic_tasks')
|
|
|
->where('status', 'processing')
|
|
|
->where('model', 'jimeng_4.0')
|
|
|
@@ -47,9 +47,14 @@ class CheckImageGenerationTasksCommand extends Command
|
|
|
->whereIn('model', BaseConst::VOLC_PIC_MODELS)
|
|
|
->count('id');
|
|
|
|
|
|
- $totalCount = $jimengProcessingCount + $volcPendingCount;
|
|
|
+ $gptPendingCount = DB::table('mp_generate_pic_tasks')
|
|
|
+ ->where('status', 'pending')
|
|
|
+ ->whereIn('model', BaseConst::GPT_IMAGE2_MODELS)
|
|
|
+ ->count('id');
|
|
|
+
|
|
|
+ $totalCount = $jimengProcessingCount + $volcPendingCount + $gptPendingCount;
|
|
|
|
|
|
- dLog('command')->info("待处理任务统计 - 即梦AI处理中: {$jimengProcessingCount}, 火山API待处理: {$volcPendingCount}");
|
|
|
+ dLog('command')->info("待处理任务统计 - 即梦AI处理中: {$jimengProcessingCount}, 火山API待处理: {$volcPendingCount}, GPT待处理: {$gptPendingCount}");
|
|
|
|
|
|
while ($totalCount > 0) {
|
|
|
$time_diff = time() - $time_start;
|
|
|
@@ -74,7 +79,12 @@ class CheckImageGenerationTasksCommand extends Command
|
|
|
->whereIn('model', BaseConst::VOLC_PIC_MODELS)
|
|
|
->count('id');
|
|
|
|
|
|
- $totalCount = $jimengProcessingCount + $volcPendingCount;
|
|
|
+ $gptPendingCount = DB::table('mp_generate_pic_tasks')
|
|
|
+ ->where('status', 'pending')
|
|
|
+ ->whereIn('model', BaseConst::GPT_IMAGE2_MODELS)
|
|
|
+ ->count('id');
|
|
|
+
|
|
|
+ $totalCount = $jimengProcessingCount + $volcPendingCount + $gptPendingCount;
|
|
|
}
|
|
|
|
|
|
dLog('command')->info('任务状态检查完成');
|