Class: Dis::Jobs::Store

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/dis/jobs/store.rb

Overview

Dis Store Job

Handles delayed storage of objects.

Dis::Jobs::Store.perform_later("documents", key)

Instance Method Summary collapse

Instance Method Details

#perform(type, key) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/dis/jobs/store.rb', line 17

def perform(type, key)
  Dis::Storage.delayed_store(type, key)
rescue Dis::Errors::NotFoundError
  Rails.logger.warn(
    "Delayed store failed, object not found: #{[type, key].inspect}"
  )
end