|
|
|
@ -11,12 +11,14 @@ class Videos::DispatchCallbackService < ApplicationService
|
|
|
|
|
|
|
|
|
|
# TODO:: 拆分事件分发
|
|
|
|
|
case params['EventType']
|
|
|
|
|
when 'FileUploadComplete' then
|
|
|
|
|
when 'FileUploadComplete' then # 视频上传完成
|
|
|
|
|
video.file_url = params['FileUrl']
|
|
|
|
|
video.upload_success
|
|
|
|
|
video.save!
|
|
|
|
|
when 'SnapshotComplete' then # 封面截图完成
|
|
|
|
|
return if video.cover_url.present?
|
|
|
|
|
|
|
|
|
|
GetAliyunVideoInfoJob.perform_later(video.uuid)
|
|
|
|
|
video.update!(cover_url: params['CoverUrl'])
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
rescue => ex
|
|
|
|
|