sobjects/supervising.py
branchstable
changeset 3131 596f893451c0
parent 2650 18aec79ec3a3
child 3136 ed303cf3a048
equal deleted inserted replaced
3130:2486163c4630 3131:596f893451c0
    21     events = ('before_add_relation', 'before_delete_relation',
    21     events = ('before_add_relation', 'before_delete_relation',
    22               'after_add_entity', 'before_update_entity')
    22               'after_add_entity', 'before_update_entity')
    23     accepts = ('Any',)
    23     accepts = ('Any',)
    24 
    24 
    25     def call(self, session, *args):
    25     def call(self, session, *args):
       
    26         if session.is_super_session or session.repo.config.repairing:
       
    27             return # ignore changes triggered by hooks or maintainance shell
    26         dest = self.config['supervising-addrs']
    28         dest = self.config['supervising-addrs']
    27         if not dest: # no supervisors, don't do this for nothing...
    29         if not dest: # no supervisors, don't do this for nothing...
    28             return
    30             return
    29         self.session = session
    31         self.session = session
    30         if self._call(*args):
    32         if self._call(*args):