Class: Operationable::Runners::Base

Inherits:
Object
  • Object
show all
Extended by:
Wrappable
Defined in:
lib/operationable/runners/base.rb

Direct Known Subclasses

Separate, Serial

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Wrappable

add_part, inherited_callbacks, new

Constructor Details

#initialize(record, params, result, user) ⇒ Base

Returns a new instance of Base.



45
46
47
48
49
50
51
52
53
# File 'lib/operationable/runners/base.rb', line 45

def initialize(record, params, result, user)
  @record = record
  @params = params
  @result = result
  @user = user
  @callbacks = []

  initialize_callbacks
end

Instance Attribute Details

#callbacksObject (readonly)

Returns the value of attribute callbacks.



41
42
43
# File 'lib/operationable/runners/base.rb', line 41

def callbacks
  @callbacks
end

#paramsObject (readonly)

Returns the value of attribute params.



41
42
43
# File 'lib/operationable/runners/base.rb', line 41

def params
  @params
end

#recordObject (readonly)

Returns the value of attribute record.



41
42
43
# File 'lib/operationable/runners/base.rb', line 41

def record
  @record
end

#resultObject (readonly)

Returns the value of attribute result.



41
42
43
# File 'lib/operationable/runners/base.rb', line 41

def result
  @result
end

#userObject (readonly)

Returns the value of attribute user.



41
42
43
# File 'lib/operationable/runners/base.rb', line 41

def user
  @user
end

Instance Method Details

#check_status?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/operationable/runners/base.rb', line 59

def check_status?
  true
end

#ensure_enqueueObject



70
71
72
# File 'lib/operationable/runners/base.rb', line 70

def ensure_enqueue

end

#job_async_execute_methodObject



82
83
84
# File 'lib/operationable/runners/base.rb', line 82

def job_async_execute_method
  :perform_later
end

#job_classObject



74
75
76
# File 'lib/operationable/runners/base.rb', line 74

def job_class
  'OperationJob'
end

#job_sync_execute_methodObject



78
79
80
# File 'lib/operationable/runners/base.rb', line 78

def job_sync_execute_method
  :perform_later
end

#persist?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/operationable/runners/base.rb', line 63

def persist?
  true
end

#runObject



67
68
# File 'lib/operationable/runners/base.rb', line 67

def run
end

#store_callback(q_options) ⇒ Object



55
56
57
# File 'lib/operationable/runners/base.rb', line 55

def store_callback(q_options)
  q_options
end