Beispiel #1
0
    def container_run(self, jobs):

        self._logger.debug("container run: %s" % str(jobs))

        # TODO: this is not optimized yet
        for job in jobs:
            job.run()
Beispiel #2
0
    def run_job(self, cmd, host):
        """ Implements saga.adaptors.cpi.job.Service.run_job()
        """

        if not cmd:
            raise saga.BadParameter._log(self._logger, "run_job needs a command to run")

        if host and host != self.rm.host:
            raise saga.BadParameter._log(self._logger, "Can only run jobs on %s, not on %s" % (self.rm.host, host))

        cmd_quoted = cmd.replace("'", "\\\\'")

        jd = saga.job.Description()

        jd.executable = "/bin/sh"
        jd.arguments = ["-c", "'%s'" % cmd_quoted]

        job = self.create_job(jd)
        job.run()

        return job
Beispiel #3
0
    def run_job(self, cmd, host):
        """ Implements saga.adaptors.cpi.job.Service.run_job()
        """

        if not cmd:
            raise saga.BadParameter._log(self._logger,
                                         "run_job needs a command to run")

        if host and host != self.rm.host:
            raise saga.BadParameter._log (self._logger, "Can only run jobs on %s, not on %s" \
                                       % (self.rm.host, host))

        cmd_quoted = cmd.replace("'", "\\\\'")

        jd = saga.job.Description()

        jd.executable = "/bin/sh"
        jd.arguments = ["-c", "'%s'" % cmd_quoted]

        job = self.create_job(jd)
        job.run()

        return job
Beispiel #4
0
    def container_run(self, jobs):

        for job in jobs:
            job.run()
Beispiel #5
0
 def container_run (self, jobs) :
     self._logger.debug("container run: %s"  %  str(jobs))
     # TODO: this is not optimized yet
     for job in jobs:
         job.run()