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()
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
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
def container_run(self, jobs): for job in jobs: job.run()
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()