def run(self, config, args):
        appname, name = self.parse_name(args['<job>'],
                default=self.default_appname(config, args))
        pname = "%s.%s" % (appname, name)
        server, procfile = config.get("server", "procfile")

        graceful_timeout = args['--graceful-timeout']
        if graceful_timeout is not None:
            if not graceful_timeout.isdigit():
                raise RuntimeError('invalid graceful timeout value')
            graceful_timeout = int(graceful_timeout)

        env = config.env.copy()
        env.update(self.parse_env(args))

        try:
            job = server.get_job(pname)
            pid = job.commit(graceful_timeout=graceful_timeout, env=env)
            print("%r: new process %r launched" % (pname, pid))
        except GafferNotFound:
            print("%r not found" % pname)
dataset/ETHPy150Open benoitc/gaffer/gaffer/cli/commands/run.py/Run.run/original