aboutsummaryrefslogtreecommitdiff
path: root/steuermann/nodes.py
diff options
context:
space:
mode:
authorsienkiew <sienkiew@d34015c8-bcbb-4646-8ac8-8ba5febf221d>2012-12-19 10:00:58 -0500
committersienkiew <sienkiew@d34015c8-bcbb-4646-8ac8-8ba5febf221d>2012-12-19 10:00:58 -0500
commit26153d1d08fe56601d4b4bc3c36baf7b72463aa3 (patch)
tree4f435a2d5adf5fca1a0822aaa538a9decc720143 /steuermann/nodes.py
parent5bfd11f1d4fdf8c8b41b5993b665055c9162bb1a (diff)
downloadsteuermann-26153d1d08fe56601d4b4bc3c36baf7b72463aa3.tar.gz
add resource requirements to input language
git-svn-id: https://svn.stsci.edu/svn/ssb/etal/steuermann/trunk@897 d34015c8-bcbb-4646-8ac8-8ba5febf221d
Diffstat (limited to 'steuermann/nodes.py')
-rw-r--r--steuermann/nodes.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/steuermann/nodes.py b/steuermann/nodes.py
index e364f57..095b3d3 100644
--- a/steuermann/nodes.py
+++ b/steuermann/nodes.py
@@ -82,7 +82,7 @@ class command_tree(object):
def add_command_list( self, table, hostlist, command_list ) :
for host in set(hostlist) :
this_table = '%s:%s' % ( host, table )
- for command, script, script_type, after_clause, pos in command_list :
+ for command, script, script_type, after_clause, pos, resources in command_list :
# this happens once for each CMD clause
# command is the name of this command
# script is the script to run
@@ -96,7 +96,7 @@ class command_tree(object):
print "# warning: %s already used on line %s"%(command,self.node_index[command].input_line)
# create the node
- self.node_index[command]=node(command, script, script_type, nice_pos( current_file_name, pos) )
+ self.node_index[command]=node(command, script, script_type, nice_pos( current_file_name, pos), resources )
for before_name, required, pos in after_clause :
# this happens once for each AFTER clause
@@ -195,7 +195,7 @@ def wildcard_name( wild, name ) :
# true if the before node is finished running.
#
class node(object) :
- def __init__(self, name, script, script_type, input_line) :
+ def __init__(self, name, script, script_type, input_line, resources) :
# the fully qualified name of the node
self.name = name
@@ -203,6 +203,9 @@ class node(object) :
self.script = script
self.script_type = script_type
+ # what "resources" it requires
+ self.resources = resources
+
# what line of the input file specified this node; this is
# a string of the form "foo.bar 123"
self.input_line = input_line