Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-31 Thread Jonathan Vanasco
On Tuesday, January 31, 2017 at 1:04:25 PM UTC-5, Mike Orr wrote: > Your logs must be for a different purpose than mine. Not really. I log most of the same things as you, and usually aggregate at the end too. The exception is that we run statsd as well, and that logs in real time. But

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-31 Thread Mike Orr
On Mon, Jan 30, 2017 at 11:20 AM, Jonathan Vanasco wrote: > > > On Sunday, January 29, 2017 at 12:44:57 PM UTC-5, Mike Orr wrote: >> >> I sometimes use a separate database connection with autocommit for >> logging, but I do it in a request finalizer. I also do it in a >>

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-30 Thread Jonathan Vanasco
On Sunday, January 29, 2017 at 12:44:57 PM UTC-5, Mike Orr wrote: > > I sometimes use a separate database connection with autocommit for > logging, but I do it in a request finalizer. I also do it in a > separate database because the database becomes large and other > applications use it too.

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-29 Thread Mike Orr
I sometimes use a separate database connection with autocommit for logging, but I do it in a request finalizer. I also do it in a separate database because the database becomes large and other applications use it too. On Sat, Jan 28, 2017 at 12:43 PM, Jonathan Vanasco

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-28 Thread Jonathan Vanasco
On Saturday, January 28, 2017 at 2:06:11 PM UTC-5, Mike Orr wrote: > > > How are people synchronizing something transactional with something > non-transactional, especially a database record with a filesystem > file. > I deal with this a lot in the area of S3 file archiving. I abort the

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-28 Thread Mike Orr
On Tue, Jan 24, 2017 at 8:31 AM, Jonathan Vanasco wrote: > > The zope.sqlalchemy is the gold standard, I would just focus on that. It > handles the two-phase and savepoints perfectly. I ported the savepoints > from it to repoze.sendmail years ago, and there are still

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-24 Thread Jonathan Vanasco
On Monday, January 23, 2017 at 1:26:08 PM UTC-5, Michael Merickel wrote: > > The best resource I know is > http://zodb.readthedocs.io/en/latest/transactions.html along with staring > at various implementations of data managers. A good one to look at would be > zope.sqlalchemy which is the

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-23 Thread Srikanth Bemineni
Hi, I will definitely take look at this. On Monday, January 23, 2017 at 1:19:38 PM UTC-6, Kai Groner wrote: > > I found the data manager interface somewhat convoluted, so I wrote some > adapters that allow you to write datamanagers as generator functions > (similar to

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-23 Thread Thierry Florac
Did you had a look at "pyramid_es" package? It provides a custom data manager for ElasticSearch... Regards, Thierry 2017-01-23 20:19 GMT+01:00 Kai Groner : > I found the data manager interface somewhat convoluted, so I wrote some > adapters that allow you to write datamanagers

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-23 Thread Kai Groner
I found the data manager interface somewhat convoluted, so I wrote some adapters that allow you to write datamanagers as generator functions (similar to contextlib.contextmanager). @datamanager def transactionally_do_something(): try: # BEGIN yield # VOTE yield

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-23 Thread Michael Merickel
The best resource I know is http://zodb.readthedocs.io/en/latest/transactions.html along with staring at various implementations of data managers. A good one to look at would be zope.sqlalchemy which is the data manager implementation for sqlalchemy sessions. There is also repoze.sendmail with a

[pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-23 Thread Srikanth Bemineni
Hi, Are there any tutorials to write custom data mangers. I am thinking of writing a custom data manager for a elastic search object, if database commit succeeds. Is this good approach to solve this problem? What is the difference between data manager and resource manger. ?