Skip to content

Commit

Permalink
Remove done_{summon,update}_hook
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Oct 1, 2015
1 parent b232c44 commit bd4f036
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
24 changes: 0 additions & 24 deletions vistrails/core/interpreter/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ class AbortExecution(Exception):

class BaseInterpreter(object):

def __init__(self):
""" BaseInterpreter() -> BaseInterpreter
Initialize class members
"""
self.done_summon_hook = None
self.done_update_hook = None

def resolve_aliases(self, pipeline,
customAliases=None):
# We don't build the alias dictionary anymore because as we don't
Expand Down Expand Up @@ -133,20 +125,4 @@ def resolve_variables(self, vistrail_variables, pipeline):
if func.name == 'value':
func.params[0].strValue = strValue

def set_done_summon_hook(self, hook):
""" set_done_summon_hook(hook: function(pipeline, objects)) -> None
Assign a function to call right after every objects has been
summoned during execution
"""
self.done_summon_hook = hook

def set_done_update_hook(self, hook):
""" set_done_update_hook(hook: function(pipeline, objects)) -> None
Assign a function to call right after every objects has been
updated
"""
self.done_update_hook = hook

##############################################################################
12 changes: 0 additions & 12 deletions vistrails/core/interpreter/cached.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ def fetch(name, default):
sinks = fetch('sinks', None)
reason = fetch('reason', None)
actions = fetch('actions', None)
done_summon_hooks = fetch('done_summon_hooks', [])
module_executed_hook = fetch('module_executed_hook', [])
stop_on_error = fetch('stop_on_error', True)
parent_exec = fetch('parent_exec', None)
Expand Down Expand Up @@ -424,11 +423,6 @@ def create_constant(param, module):
dst = self._objects[conn.destinationId]
self.make_connection(conn, src, dst)

if self.done_summon_hook:
self.done_summon_hook(self._persistent_pipeline, self._objects)
for callable_ in done_summon_hooks:
callable_(self._persistent_pipeline, self._objects)

tmp_id_to_module_map = {}
for i, j in tmp_to_persistent_module_map.iteritems():
tmp_id_to_module_map[i] = self._objects[j]
Expand All @@ -452,7 +446,6 @@ def fetch(name, default):
reason = fetch('reason', None)
actions = fetch('actions', None)
module_executed_hook = fetch('module_executed_hook', [])
done_summon_hooks = fetch('done_summon_hooks', [])
clean_pipeline = fetch('clean_pipeline', False)
stop_on_error = fetch('stop_on_error', True)
parent_exec = fetch('parent_exec', None)
Expand Down Expand Up @@ -586,9 +579,6 @@ def make_change_parameter(obj):
break

Generator.generators = self._streams.pop()

if self.done_update_hook:
self.done_update_hook(self._persistent_pipeline, self._objects)

# objs, errs, and execs are mappings that use the local ids as keys,
# as opposed to the persistent ids.
Expand Down Expand Up @@ -663,7 +653,6 @@ def execute(self, pipeline, **kwargs):
logger = fetch('logger', DummyLogController)
reason = fetch('reason', None)
actions = fetch('actions', None)
done_summon_hooks = fetch('done_summon_hooks', [])
module_executed_hook = fetch('module_executed_hook', [])
job_monitor = fetch('job_monitor', None)
Expand Down Expand Up @@ -705,7 +694,6 @@ def fetch(name, default):
sinks = fetch('sinks', None)
reason = fetch('reason', None)
actions = fetch('actions', None)
done_summon_hooks = fetch('done_summon_hooks', [])
module_executed_hook = fetch('module_executed_hook', [])
stop_on_error = fetch('stop_on_error', True)
parent_exec = fetch('parent_exec', None)
Expand Down

0 comments on commit bd4f036

Please sign in to comment.