Commit ffc3f1f7 authored by Łukasz Nowak's avatar Łukasz Nowak

- LOG when monkey patching

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25713 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf54ef1b
......@@ -27,6 +27,7 @@
##############################################################################
from ZEO.ClientStorage import ClientStorage
from zLOG import LOG, WARNING, INFO
LAST_COMMITED_TID_PROPERTY_ID = '_last_commited_tid'
......@@ -34,6 +35,8 @@ LAST_COMMITED_TID_PROPERTY_ID = '_last_commited_tid'
# New hook must be a local method because it must access tpc_finish's "self"
# and original hook.
LOG('TIDStorage',INFO,'Monkey patching ClientStorage.tpc_finish and ClientStorage.getLastCommitedTID')
original_tpc_finish = ClientStorage.tpc_finish
def tpc_finish(self, txn, f=None):
def saveTIDOnInstance(tid):
......
......@@ -28,7 +28,7 @@
from ExchangeProtocol import ExchangeProtocol
from transaction._transaction import Transaction
from zLOG import LOG, WARNING
from zLOG import LOG, WARNING, INFO
import socket
import thread
import struct
......@@ -40,6 +40,8 @@ TID_STORAGE_ADDRESS = ('127.0.0.1', 9001)
tid_storage = None
zope_identifier = None
LOG('TIDStorage',INFO,'Monkey patching transaction._transaction.Transaction._commitResources')
# Borrowed from CMFActivity.ActivityTool.getCurrentNode
def getZopeId():
""" Return current node in form ip:port """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment