Fix incomplete account records being read (#4998)

* Fix incomplete account records being read

- Put account processing into redis lock
- Do not save until record is complete

* Fix spaces
This commit is contained in:
Eugen Rochko
2017-09-19 06:53:16 +02:00
committed by GitHub
parent 813e650729
commit 41e6c8b151
2 changed files with 57 additions and 25 deletions

View File

@ -18,7 +18,7 @@ class MediaProxyController < ApplicationController
def redownload!
@media_attachment.file_remote_url = @media_attachment.remote_url
@media_attachment.touch(:created_at)
@media_attachment.created_at = Time.now.utc
@media_attachment.save!
end