Class: SolidQueue::RecurringTask::Arguments

Inherits:
Object
  • Object
show all
Defined in:
app/models/solid_queue/recurring_task/arguments.rb

Class Method Summary collapse

Class Method Details

.dump(data) ⇒ Object



12
13
14
# File 'app/models/solid_queue/recurring_task/arguments.rb', line 12

def dump(data)
  ActiveSupport::JSON.dump(ActiveJob::Arguments.serialize(Array(data)))
end

.load(data) ⇒ Object



8
9
10
# File 'app/models/solid_queue/recurring_task/arguments.rb', line 8

def load(data)
  data.nil? ? [] : ActiveJob::Arguments.deserialize(ActiveSupport::JSON.load(data))
end