Module: ResqueJobsTree
Defined Under Namespace
Modules: Factory, ResourcesSerializer, Storage
Classes: Definitions, Job, JobNotUniq, Node, NodeDefinitionInvalid, Tree, TreeDefinitionInvalid
Constant Summary
collapse
- VERSION =
"0.5.3"
Instance Method Summary
collapse
Instance Method Details
#create(*resources) ⇒ Object
34
35
36
|
# File 'lib/resque_jobs_tree.rb', line 34
def create *resources
Factory.create *resources
end
|
#find(name) ⇒ Object
25
26
27
|
# File 'lib/resque_jobs_tree.rb', line 25
def find name
Factory.find name.to_s
end
|
#launch(name, *resources) ⇒ Object
29
30
31
32
|
# File 'lib/resque_jobs_tree.rb', line 29
def launch name, *resources
tree_definition = find name
tree_definition ? tree_definition.spawn(resources).launch : raise("Can't find tree `#{name}`")
end
|