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)
Exemple #2
0
 def stop(self, _id):
     if not self.supervisor.stopProcess(_id):
         raise ServiceOperationError('Supervisor operation failed')
Exemple #3
0
 def restart(self, _id):
     try:
         UpstartJob(_id).restart()
     except DBusException as e:
         raise ServiceOperationError(e)