Skip to content

Commit b8700fc

Browse files
author
Alexander Smishlajev
committed
db detectors got priority numbers (rfe [SF#1413165])
1 parent 8c32292 commit b8700fc

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

doc/design.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -729,12 +729,6 @@ hyperdatabase, except for the following changes and additional methods::
729729
properties or "actor" cause a KeyError.
730730
"""
731731

732-
# New methods:
733-
734-
def audit(self, event, detector):
735-
def react(self, event, detector):
736-
"""Register a detector (see below for more details)."""
737-
738732
class IssueClass(Class):
739733
# Overridden methods:
740734

@@ -855,20 +849,22 @@ The ``audit()`` and ``react()`` methods register detectors on a given
855849
class of items::
856850

857851
class Class:
858-
def audit(self, event, detector):
852+
def audit(self, event, detector, priority=100):
859853
"""Register an auditor on this class.
860854

861855
'event' should be one of "create", "set", "retire", or
862856
"restore". 'detector' should be a function accepting four
863-
arguments.
857+
arguments. Detectors are called in priority order, execution
858+
order is undefined for detectors with the same priority.
864859
"""
865860

866-
def react(self, event, detector):
861+
def react(self, event, detector, priority=100):
867862
"""Register a reactor on this class.
868863

869864
'event' should be one of "create", "set", "retire", or
870865
"restore". 'detector' should be a function accepting four
871-
arguments.
866+
arguments. Detectors are called in priority order, execution
867+
order is undefined for detectors with the same priority.
872868
"""
873869

874870
Auditors are called with the arguments::

0 commit comments

Comments
 (0)