Class: Cws3chk::Checker

Inherits:
Struct
  • Object
show all
Includes:
ThreadifyProcs
Defined in:
lib/cws3chk/checker.rb

Overview

This class is in charge of checking the existance on S3 of the assets described by ActiveRecord + Carrierwave. It checks for the existence of the original file an the different versions. It stores the result of the check in Redis.

After loading the data from the database, it performs the calls to S3 in parallel via threads.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mounted_columnObject

Returns the value of attribute mounted_column

Returns:

  • (Object)

    the current value of mounted_column



12
13
14
# File 'lib/cws3chk/checker.rb', line 12

def mounted_column
  @mounted_column
end

#requestObject

Returns the value of attribute request

Returns:

  • (Object)

    the current value of request



12
13
14
# File 'lib/cws3chk/checker.rb', line 12

def request
  @request
end

#threadsObject

Returns the value of attribute threads

Returns:

  • (Object)

    the current value of threads



12
13
14
# File 'lib/cws3chk/checker.rb', line 12

def threads
  @threads
end

Instance Method Details

#checkObject



15
16
17
# File 'lib/cws3chk/checker.rb', line 15

def check
  call_with_threads procs, number_of_threads: threads
end