lib/isomorfeus/operation/deferred_task.rb in isomorfeus-operation-2.4.2 vs lib/isomorfeus/operation/deferred_task.rb in isomorfeus-operation-2.5.0
- old
+ new
@@ -8,10 +8,10 @@
# when it was successful, its removed from the queue
attribute :operation_class_name, class: String, required: true, validate_block: proc { |v| raise 'Invalid Operation class!' unless Isomorfeus.valid_operation_class_name?(v) }
attribute :props
attribute :user_class_name, class: String, default: 'Anonymous'
attribute :user_key, class: String, default: 'anonymous'
- attribute :state, class: String, required: true, index: :value, ensure: proc { |v| Isomorfeus::Operation::DeferredTask::STATES.include?(v) ? v : 'ready' }
+ attribute :state, class: String, required: true, index: :yes, ensure: proc { |v| Isomorfeus::Operation::DeferredTask::STATES.include?(v) ? v : 'ready' }
attribute :exception
attribute :rtime
def get_exception
Marshal.load(exception) if exception