コード例 #1
0
ファイル: max.py プロジェクト: UPCnet/gummanager.cli
    def stop(self, **kwargs):
        """
            Stops a max instance.

            Supervisord process must be running in order to use this command
        """
        instance_name = getOptionFrom(kwargs, 'instance-name')
        maxserver = self.Server
        status = maxserver.get_status(instance_name)

        if status['status'] == 'running':
            maxserver.stop(instance_name)
        else:
            padded_success("Already stopped")
コード例 #2
0
ファイル: max.py プロジェクト: UPCnet/gummanager.cli
    def start(self, **kwargs):
        """
            Starts a max instance.

            If the instance is not loaded on supervisor, it will be loaded and started.
            In every other case the instance will be started from the prior status.
            Supervisord process must be running in order to use this command
        """
        instance_name = getOptionFrom(kwargs, 'instance-name')
        maxserver = self.Server
        status = maxserver.get_status(instance_name)
        if status['status'] == 'running':
            padded_success("Already running")
        else:
            maxserver.start(instance_name)
コード例 #3
0
ファイル: oauth.py プロジェクト: UPCnet/gummanager.cli
    def stop(self, **kwargs):
        """
            Stops an oauth instance.

            Supervisord process must be running in order to use this command
        """
        instance_name = getOptionFrom(kwargs, 'instance-name')
        oauth = self.Server
        status = oauth.get_status(instance_name)
        if status['status'] == 'running':
            oauth.stop(instance_name)
        else:
            padded_success("Already stopped")
        if status['status'] == 'stopped':
            print '\nAlready stopped\n'