コード例 #1
0
    def register_operation(self, trigger_id, operation_id, **kwargs):
        if trigger_id not in self._trigger:
            self._trigger[trigger_id] = []

        if operation_id in self._trigger[trigger_id]:
            raise exception.ScheduledOperationExist(op_id=operation_id)

        self._trigger[trigger_id].append(operation_id)
コード例 #2
0
ファイル: time_trigger.py プロジェクト: yinweiishere/karbor
    def register_operation(self, operation_id, **kwargs):
        if operation_id in self._operation_ids:
            msg = (_("The operation_id(%s) is exist") % operation_id)
            raise exception.ScheduledOperationExist(msg)

        if self._greenthread and not self._greenthread.running:
            raise exception.TriggerIsInvalid(trigger_id=self._id)

        self._operation_ids.add(operation_id)
        if self._greenthread is None:
            self._start_greenthread()
コード例 #3
0
ファイル: time_trigger.py プロジェクト: chenyingkof/karbor
    def register_operation(self, operation_id, **kwargs):
        if operation_id in self._operation_ids:
            msg = (_("The operation_id(%s) is exist") % operation_id)
            raise exception.ScheduledOperationExist(msg)

        self._operation_ids.add(operation_id)