Start the process with the same arguments after it was stopped.
(self)
| 522 | check_call(["docker", "container", "stop", self.container_id]) |
| 523 | |
| 524 | def start(self): |
| 525 | """Start the process with the same arguments after it was stopped.""" |
| 526 | if self.container_id is None: |
| 527 | binary = os.path.basename(self.cmd[0]) |
| 528 | restart_args = self.cmd[1:] |
| 529 | LOG.info("Starting {0} with arguments {1}".format(binary, restart_args)) |
| 530 | run_daemon(binary, restart_args) |
| 531 | else: |
| 532 | LOG.info("Starting container: {0}".format(self.container_id)) |
| 533 | check_call(["docker", "container", "start", self.container_id]) |
| 534 | |
| 535 | def restart(self, signal=SIGKILL): |
| 536 | """Kills and restarts the process""" |
no test coverage detected