[open-ils-commits] r1214 - constrictor/trunk/contrib/evergreen (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Jan 29 11:06:54 EST 2011
Author: erickson
Date: 2011-01-29 11:06:51 -0500 (Sat, 29 Jan 2011)
New Revision: 1214
Modified:
constrictor/trunk/contrib/evergreen/eg_checkout_roundtrip.py
Log:
build datamanager at script init instead of during each call to run() to avoid unnecessary server calls
Modified: constrictor/trunk/contrib/evergreen/eg_checkout_roundtrip.py
===================================================================
--- constrictor/trunk/contrib/evergreen/eg_checkout_roundtrip.py 2011-01-28 23:50:31 UTC (rev 1213)
+++ constrictor/trunk/contrib/evergreen/eg_checkout_roundtrip.py 2011-01-29 16:06:51 UTC (rev 1214)
@@ -6,16 +6,21 @@
from eg_workflow import *
eg_utils.init()
+dm = None
-
class CheckoutRoundtripScript(Script):
+ def __init__(self):
+ global dm
+ Script.__init__(self)
+ dm = DataManager()
+
+
def on_thread_init(self, scriptThread):
eg_utils.init_thread()
def run(self):
- dm = DataManager()
patronID = dm.get_thread_data(PROP_PATRON_ID)
copyBarcode = dm.get_thread_data(PROP_COPY_BARCODE, True)
More information about the open-ils-commits
mailing list