Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing extra invalidation request sneaked in after a merge

Also always logging when pushing a file to S3
  • Loading branch information...
commit fbb0eaa43f2c29eeece40c7a06a776c83d6621e1 1 parent edb3cd7
@kmamykin kmamykin authored
Showing with 5 additions and 10 deletions.
  1. +5 −10 lib/jammit/s3_uploader.rb
View
15 lib/jammit/s3_uploader.rb
@@ -90,21 +90,16 @@ def upload_from_glob(glob)
new_object.content = open(local_path)
new_object.content_encoding = "gzip" if use_gzip
new_object.acl = @acl if @acl
+ log "pushing file to s3: #{remote_path}"
new_object.save
-
+
if Jammit.configuration[:use_cloudfront] && obj
- log "updating the file on s3 and cloudfront: #{remote_path}"
- @changed_files << remote_path
- else
- log "pushing file to s3: #{remote_path}"
+ log "File changed and will be invalidated in cloudfront: #{remote_path}"
+ @changed_files << remote_path
end
else
log "file has not changed: #{remote_path}"
- end
- end
- if Jammit.configuration[:use_cloudfront] && !@changed_files.empty?
- log "invalidating cloudfront cache for changed files"
- invalidate_cache(@changed_files)
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.