Exemple #1
0
 def cleanup_drmaa_files(self, scheduler_job_id):
     filename = os.path.join(Configuration.get_home_dir(),
                             '.drmaa', str(scheduler_job_id))
     startfile = '%s.started' % filename
     endfile = '%s.exitcode' % filename
     for f in (startfile, endfile):
         if os.path.exists(f):
             os.unlink(f)
Exemple #2
0
 def cleanup_drmaa_files(self, scheduler_job_id):
     filename = os.path.join(Configuration.get_home_dir(), '.drmaa',
                             str(scheduler_job_id))
     startfile = '%s.started' % filename
     endfile = '%s.exitcode' % filename
     for f in (startfile, endfile):
         if os.path.exists(f):
             os.unlink(f)
from soma_workflow.configuration import Configuration
# from soma_workflow.connection import RemoteConnection

user = '******'
try:
    import pwd
    user = pwd.getpwuid(os.getuid()).pw_name
except Exception:
    pass

controller = WorkflowController("Gabriel", user)

# FileTransfer creation for input files
file1 = FileTransfer(is_input=True,
                     client_path="%s/create_file.py" %
                     Configuration.get_home_dir(),
                     name="script")

file2 = FileTransfer(is_input=True,
                     client_path="%s/output_file" %
                     Configuration.get_home_dir(),
                     name="file created on the server")

# Job and Workflow
run_script = Job(command=["python", file1, file2],
                 name="copy",
                 referenced_input_files=[file1],
                 referenced_output_files=[file2])

workflow = Workflow(jobs=[run_script], dependencies=[])