Skip to content
/ cws3chk Public
forked from FinalCAD/cws3chk

Check assets are on S3 as Carrierwave says

License

Notifications You must be signed in to change notification settings

aq/cws3chk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cws3chk

This gem checks the existance on S3 of the assets described by ActiveRecord and Carrierwave.

  • It loads the ids of the object with assets in a task and splits them into groups. Each group is going to be processed by a Resque Job.
  • It studies the groups of object by launching n threads. It checks for the existence of the original file and the different versions.
  • It stores the result of the check in Redis.

Installation

Add this line to your application's Gemfile:

gem 'Cws3chk'

And then execute:

$ bundle

Usage

$ bundle exec rake Cws3chk:check

or

request = User.with_avatar
Cws3chk::Checker.new(request, :avatar, 250).check

Then study your missig assets and fix them if needed:

redis.smembers 'Cws3chk::missing'

You can also study the size of the resulting assets:

redis.smembers 'Cws3chk::metadata'

About

Check assets are on S3 as Carrierwave says

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%