|
@@ -1520,13 +1520,16 @@ class AIVideoGenerationService
|
|
|
$responseData = $this->requestSeedance20Gateway('CreateAsset', $createAssetBody);
|
|
$responseData = $this->requestSeedance20Gateway('CreateAsset', $createAssetBody);
|
|
|
} catch (\GuzzleHttp\Exception\RequestException $e) {
|
|
} catch (\GuzzleHttp\Exception\RequestException $e) {
|
|
|
$errorBody = $e->hasResponse() ? (string)$e->getResponse()->getBody() : '';
|
|
$errorBody = $e->hasResponse() ? (string)$e->getResponse()->getBody() : '';
|
|
|
- if (strpos($errorBody, 'asset_space_mismatch') === false) {
|
|
|
|
|
|
|
+ // 素材组空间失效/不存在(资产空间迁移或素材组被清理),创建新素材组并重试一次
|
|
|
|
|
+ $groupInvalid = strpos($errorBody, 'asset_space_mismatch') !== false
|
|
|
|
|
+ || strpos($errorBody, 'NotFound.group_id') !== false
|
|
|
|
|
+ || (stripos($errorBody, 'not found') !== false && stripos($errorBody, 'asset_group') !== false);
|
|
|
|
|
+ if (!$groupInvalid) {
|
|
|
throw $e;
|
|
throw $e;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 素材组空间失效(网关资产空间迁移),创建新素材组并重试一次
|
|
|
|
|
- dLog('generate')->warning('Seedance 2.0 素材组空间失效,创建新素材组重试: ' . $groupId);
|
|
|
|
|
- logDB('generate', 'warning', 'Seedance2.0素材组空间失效', [
|
|
|
|
|
|
|
+ dLog('generate')->warning('Seedance 2.0 素材组空间失效或不存在,创建新素材组重试: ' . $groupId);
|
|
|
|
|
+ logDB('generate', 'warning', 'Seedance2.0素材组空间失效或不存在', [
|
|
|
'group_id' => $groupId,
|
|
'group_id' => $groupId,
|
|
|
'error' => $errorBody
|
|
'error' => $errorBody
|
|
|
]);
|
|
]);
|
|
@@ -1691,6 +1694,7 @@ class AIVideoGenerationService
|
|
|
->where('source_type', 'baidu')
|
|
->where('source_type', 'baidu')
|
|
|
->whereNotNull('group_id')
|
|
->whereNotNull('group_id')
|
|
|
->where('group_id', '!=', '')
|
|
->where('group_id', '!=', '')
|
|
|
|
|
+ ->where('asset_id', 'not like', 'group-%')
|
|
|
->orderBy('id', 'desc')
|
|
->orderBy('id', 'desc')
|
|
|
->select('group_id')
|
|
->select('group_id')
|
|
|
->first();
|
|
->first();
|