On 2010-1-6 21:51, Tres Seaver wrote:
> Hash: SHA1
> Wichert Akkerman wrote:
>>> I wouldn't go there, myself:  among other things, you lose the ability
>>> to do coordination with repoze.retry (e.g., on Postgres' equivalent to a
>>> ConflictError).
>> I'm not sure why you would loose that. I've never used repoze.retry, so
>> perhaps I'm missing something. Could you expand a bit on that?
> repoze.retry does what the Zope publisher does on ConflictErrors, but
> can be configured to catch other exceptions besides ConflictError:
> PGSQL has an optimistic concurrency mode which raises a simliar
> exception.  You can also tweak the number of retries.


> Wiring tm2 into the app makes it impossible to configure retry in the
> "correct" place via PasteDeploy:  you would have to hardwire *it* into
> the app as well (retry needs to be between tm2 and the app).

That is what I would do indeed. Personally I consider endware to be part 
of the application instead of its configuration, so I want that to be in 
python. I gather that you and Chris feel otherwise, which is fine as well.

There is a small downside / awkwardness you have to deal with if you use 
a paste deploy pipeline: you have to manually specify the config part of 
your application if you use setup-app or any other paster command. In 
other words you need to do:

    paster setup-app config.ini#app

otherwise your setup method is called with the pipeline configuration 
(since that is 'main') instead of the app configuration.


Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.
Repoze-dev mailing list

Reply via email to