cubicweb/hooks/test/data/hooks.py
author Philippe Pepiot <ph@itsalwaysdns.eu>
Mon, 30 Mar 2020 15:30:02 +0200
changeset 12961 01810941a4be
parent 12355 c703dc95c82e
permissions -rw-r--r--
[server] use a LifoQueue in _CnxSetPool In postgresql, some cache is attached to the connection. Using a LifoQueue (last-in, first-out) makes a few connections to get the most load which give best performance.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11084
ffd615e626f9 [hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     1
from cubicweb.predicates import is_instance
ffd615e626f9 [hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     2
from cubicweb.hooks import notification
ffd615e626f9 [hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     3
ffd615e626f9 [hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     4
ffd615e626f9 [hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     5
class FolderUpdateHook(notification.EntityUpdateHook):
12355
c703dc95c82e Fix flake8 issues since release 3.6.0
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 11129
diff changeset
     6
    __select__ = (notification.EntityUpdateHook.__select__
c703dc95c82e Fix flake8 issues since release 3.6.0
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 11129
diff changeset
     7
                  & is_instance('Folder'))
11084
ffd615e626f9 [hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     8
    order = 100  # late trigger so that metadata hooks come before.