Method: ActiveStorage::Blob::Analyzable#analyze_later

Defined in:
activestorage/app/models/active_storage/blob/analyzable.rb

#analyze_laterObject

Enqueues an ActiveStorage::AnalyzeJob which calls #analyze, or calls #analyze inline based on analyzer class configuration.

This method is automatically called for a blob when it’s attached for the first time. You can call it to analyze a blob again (e.g. if you add a new analyzer or modify an existing one).



37
38
39
40
41
42
43
# File 'activestorage/app/models/active_storage/blob/analyzable.rb', line 37

def analyze_later
  if analyzer_class.analyze_later?
    ActiveStorage::AnalyzeJob.perform_later(self)
  else
    analyze
  end
end