コード例 #1
0
ファイル: upstart_manager.py プロジェクト: starnetwork/ajenti
    def stop(self, _id):
        """
        Basically stop a job.

        :param _id: job name
        :type _id: string
        """

        try:
            UpstartJob(_id).stop()
        except DBusException as e:
            raise ServiceOperationError(e)
コード例 #2
0
 def stop(self, _id):
     if not self.supervisor.stopProcess(_id):
         raise ServiceOperationError('Supervisor operation failed')
コード例 #3
0
 def restart(self, _id):
     try:
         UpstartJob(_id).restart()
     except DBusException as e:
         raise ServiceOperationError(e)