Class: Taskinator::CreateProcessWorker
- Inherits:
-
Object
- Object
- Taskinator::CreateProcessWorker
- Defined in:
- lib/taskinator/create_process_worker.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#initialize(definition_name, uuid, args) ⇒ CreateProcessWorker
constructor
A new instance of CreateProcessWorker.
- #perform ⇒ Object
Constructor Details
#initialize(definition_name, uuid, args) ⇒ CreateProcessWorker
Returns a new instance of CreateProcessWorker.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/taskinator/create_process_worker.rb', line 8 def initialize(definition_name, uuid, args) # convert to the module @definition = constantize(definition_name) # this will be uuid of the created process @uuid = uuid # convert to the typed arguments @args = Taskinator::Persistence.deserialize(args) end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
6 7 8 |
# File 'lib/taskinator/create_process_worker.rb', line 6 def args @args end |
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
4 5 6 |
# File 'lib/taskinator/create_process_worker.rb', line 4 def definition @definition end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
5 6 7 |
# File 'lib/taskinator/create_process_worker.rb', line 5 def uuid @uuid end |
Instance Method Details
#perform ⇒ Object
21 22 23 |
# File 'lib/taskinator/create_process_worker.rb', line 21 def perform @definition._create_process_(*@args, :uuid => @uuid).enqueue! end |