[ Jürgen Herrmann wrote:]
...
> hook = object.get('_before_transaction_commit', None)
> if hook: hook()
...
of course it should be:
getattr(object, '_before_transaction_commit', None)
regards, juergen herrmann
___
>
Have a look at how CPS uses this hook to delay indexing to the end of
the transaction.
Code is at http://svn.nuxeo.org/trac/pub/file/CPSCore/trunk/
IndexationManager.py
Then in all objects for which we want to delay indexing, we replace
the reindexObject() method with:
def reindexObj
hi all!
as i had time to look at all the stuff, i realized, that i'm
getting closer, but this is not exactly what i wanted...
as i can see from the path, one has to call:
beforeCommitHook(method, **args, **kwargs)
on each transaction, correct?
this is contrary to my idea of everything doing i
Dieter Maurer <[EMAIL PROTECTED]> wrote:
> Jürgen Herrmann wrote at 2005-6-17 14:19 +0200:
> >i make heavy use of indexes in my extension classes. these all inherit
> >from catalogpathaware, so i have to call object.reindex_object() on
> >each changed instance. calling it from attribute getters/se
[ Dieter Maurer wrote:]
> Jürgen Herrmann wrote at 2005-6-17 14:19 +0200:
>>i make heavy use of indexes in my extension classes. these all inherit
>>from catalogpathaware, so i have to call object.reindex_object() on
>>each changed instance. calling it from attribute getters/setters f.ex.
>>is not
Jürgen Herrmann wrote at 2005-6-17 14:19 +0200:
>i make heavy use of indexes in my extension classes. these all inherit
>from catalogpathaware, so i have to call object.reindex_object() on
>each changed instance. calling it from attribute getters/setters f.ex.
>is not a good idea, because changing
On Fri, Jun 17, 2005 at 02:19:26PM +0200, J?rgen Herrmann wrote:
> hi all!
>
> i make heavy use of indexes in my extension classes. these all inherit
> from catalogpathaware, so i have to call object.reindex_object() on
> each changed instance. calling it from attribute getters/setters f.ex.
> is
On 6/17/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote:
>
> [ Peter Bengtsson wrote:]
> > Personally I think one should stay the hell away from transactions.
> > They're not for you to fiddle with.
> > I understand your question and even though I think it's a bit crazy I
> > can see a benefit (simp
[ Peter Bengtsson wrote:]
> Personally I think one should stay the hell away from transactions.
> They're not for you to fiddle with.
> I understand your question and even though I think it's a bit crazy I
> can see a benefit (simplicity for the programmer).
>
> How about a trickery solution like
Personally I think one should stay the hell away from transactions.
They're not for you to fiddle with.
I understand your question and even though I think it's a bit crazy I
can see a benefit (simplicity for the programmer).
How about a trickery solution like this:
class CatalogPathAware:
def
[ Jonathan wrote:]
>
> - Original Message -
> From: "Jürgen Herrmann" <[EMAIL PROTECTED]>
>> i make heavy use of indexes in my extension classes. these all inherit
>> from catalogpathaware, so i have to call object.reindex_object() on
>> each changed instance. calling it from attribute get
- Original Message -
From: "Jürgen Herrmann" <[EMAIL PROTECTED]>
i make heavy use of indexes in my extension classes. these all inherit
from catalogpathaware, so i have to call object.reindex_object() on
each changed instance. calling it from attribute getters/setters f.ex.
is not a goo
hi all!
i make heavy use of indexes in my extension classes. these all inherit
from catalogpathaware, so i have to call object.reindex_object() on
each changed instance. calling it from attribute getters/setters f.ex.
is not a good idea, because changing 3 attributes will reindex the object
3 time
13 matches
Mail list logo