Class: Snappier::Job

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
lib/snappier/job.rb

Instance Method Summary collapse

Instance Method Details

#perform(args) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/snappier/job.rb', line 11

def perform(args)
  type = args["type"]
  id = args["id"]
  at = args["at"]

  args["at"] = Time.at(at.to_i / 1000).to_s
  args["state"] = JSON.parse(args["state"])

  Registry.persistence.persist(
    type: type,
    id: id,
    at: at,
    args: args,
  )
end