Module: Pageflow::MediaEncodingStateMachine

Extended by:
ActiveSupport::Concern
Included in:
AudioFile, VideoFile
Defined in:
app/state_machines/pageflow/media_encoding_state_machine.rb

Instance Method Summary collapse

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


105
106
107
108
109
# File 'app/state_machines/pageflow/media_encoding_state_machine.rb', line 105

def failed?
  super ||
     ||
    encoding_failed?
end

#ready?Boolean

Returns:

  • (Boolean)


101
102
103
# File 'app/state_machines/pageflow/media_encoding_state_machine.rb', line 101

def ready?
  encoded?
end

#retry!Object



111
112
113
# File 'app/state_machines/pageflow/media_encoding_state_machine.rb', line 111

def retry!
  retry_encoding!
end

#retryable?Boolean

UploadableFile-overrides

Returns:

  • (Boolean)


89
90
91
92
93
94
95
96
97
98
99
# File 'app/state_machines/pageflow/media_encoding_state_machine.rb', line 89

def retryable?
  # Calling `can_retry_encoding?` invokes
  # `Pageflow.config.confirm_encoding_jobs` which might depend on
  # accessing `file.entry.account`. If the file has been reused in
  # a different entry and the original entry has been deleted, we
  # default to making the file not retryable to prevent
  # exceptions.
  entry &&
    can_retry_encoding? &&
    !encoded?
end