uploads: fix exception with preprocessed uploads.

Fix exception when submitting an upload and an in-progress preprocessed
upload already exists. In this case we forgot to pass the upload params
when calling UploadService#delayed_start.
This commit is contained in:
evazion
2020-03-31 21:57:34 -05:00
parent 3051daf5eb
commit ab1839c613
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ class UploadServiceDelayedStartJob < ApplicationJob
queue_as :default
queue_with_priority(-1)
def perform(uploader)
UploadService.delayed_start(uploader.id)
def perform(params, uploader)
UploadService.new(params).delayed_start(uploader.id)
end
end
+1 -1
View File
@@ -22,7 +22,7 @@ class UploadService
preprocessor = Preprocessor.new(params)
if preprocessor.in_progress?
UploadServiceDelayedStartJob.set(wait: 5.seconds).perform_later(CurrentUser.user)
UploadServiceDelayedStartJob.set(wait: 5.seconds).perform_later(params, CurrentUser.user)
return preprocessor.predecessor
end