Skip to content

Commit

Permalink
WIP: Make SubmitShellJob accept portspecs
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Aug 6, 2015
1 parent 4cd7b67 commit 90def87
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vistrails/packages/tej/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def job_start(self, params):
return params


class SubmitShellJob(BaseSubmitJob):
class SubmitShellJob(AssembleDirectoryMixin, BaseSubmitJob):
"""Submits a shell script.
"""
_settings = ModuleSettings(configure_widget=(
Expand All @@ -350,6 +350,10 @@ class SubmitShellJob(BaseSubmitJob):
_output_ports = [('stderr', '(basic:File)'),
('stdout', '(basic:File)')]

def __init__(self):
AssembleDirectoryMixin.__init__(self)
Module.__init__(self)

def job_start(self, params):
"""Creates a temporary job with the given source, upload and submit it.
"""
Expand All @@ -365,8 +369,7 @@ def job_start(self, params):
return params

# Alright, submit a new job
directory = self.interpreter.filePool.create_directory(
prefix='vt_tmp_shelljob_').name
directory = self.assemble_directory(None, True).name
# We use io.open() here because we could be writing scripts on Windows
# before uploading them to a POSIX server
source = urllib.unquote(self.get_input('source'))
Expand Down

0 comments on commit 90def87

Please sign in to comment.