summaryrefslogtreecommitdiff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-01-20 21:09:19 -0700
committermo khan <mo@mokhan.ca>2015-01-20 21:09:19 -0700
commite828e53575d867c31a7cf8aa8f69164042244135 (patch)
tree476d6b334e73e832030d73f89112a45a1e23e3bb /app/controllers/admin
parentfe019088a9f63945c4556b2dae3a2f8a3b774a38 (diff)
move re-processing to background.
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/photos_controller.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/admin/photos_controller.rb b/app/controllers/admin/photos_controller.rb
index e2aaa785..793c4508 100644
--- a/app/controllers/admin/photos_controller.rb
+++ b/app/controllers/admin/photos_controller.rb
@@ -15,13 +15,7 @@ module Admin
end
def update
- photo = @photo_repository.find(params[:id])
- key = OriginalVersion.new(photo).create_key
- @storage.download(key) do |file|
- temp_file = move_to_temporary_storage(file.path, File.basename(key))
- ProcessPhotoJob.perform_later(photo, temp_file)
- end
-
+ ReProcessPhotoJob.perform_later(@photo_repository.find(params[:id]))
redirect_to admin_photos_path
end