示例#1
0
    def _check_signal(self):
        # Check timeout first, if true, return timeout message
        if self.timeout is not None and self.is_timeout():
            EVENT.debug(self, consts.PHASE_ERROR, 'TIMEOUT')
            return self.RES_TIMEOUT

        result = ao.Action.signal_query(self.context, self.id)
        return result
示例#2
0
文件: base.py 项目: GingoBang/senlin
    def _check_signal(self):
        # Check timeout first, if true, return timeout message
        if self.timeout is not None and self.is_timeout():
            EVENT.debug(self.context, self, self.action, 'TIMEOUT')
            return self.RES_TIMEOUT

        result = db_api.action_signal_query(self.context, self.id)
        return result
示例#3
0
    def test_debug(self, mock_dump):
        entity = mock.Mock(id='1234567890')
        entity.name = 'fake_obj'
        action = mock.Mock(entity=entity, action='ACTION_NAME')

        res = event.debug(action, 'P1', 'R1', 'TS1')

        self.assertIsNone(res)
        mock_dump.assert_called_once_with(logging.DEBUG, action, 'P1', 'R1',
                                          'TS1')