Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to
singularity on pypi), and the versions here will coincide with these releases.

## [master](https://github.com/singularityhub/singularity-cli/tree/master)
- instance stop with timeout argument (0.0.77)
- instance list includes ip address (0.0.76)
- export lines aren't ignored from environment, but replaced (0.0.75)
- instance logging functions for Singularity 3.5 and up (0.0.74)
Expand Down
6 changes: 5 additions & 1 deletion spython/instance/cmd/stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
from spython.logger import bot


def stop(self, name=None, sudo=False):
def stop(self, name=None, sudo=False, timeout=None):
"""stop an instance. This is done by default when an instance is created.

Parameters
==========
name: a name for the instance
sudo: if the user wants to run the command with sudo
timeout: forcebly kill non-stopped instance after the
timeout specified in seconds

USAGE:
singularity [...] instance.stop [...] <instance name>
Expand All @@ -28,6 +30,8 @@ def stop(self, name=None, sudo=False):

if "version 3" in self.version():
subgroup = ["instance", "stop"]
if timeout:
subgroup += ["-t", str(timeout)]

cmd = self._init_command(subgroup)

Expand Down
2 changes: 1 addition & 1 deletion spython/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.


__version__ = "0.0.76"
__version__ = "0.0.77"
AUTHOR = "Vanessa Sochat"
AUTHOR_EMAIL = "vsochat@stanford.edu"
NAME = "spython"
Expand Down