[open-ils-commits] r859 - constrictor/trunk/contrib/evergreen (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 11 10:51:37 EDT 2010
Author: erickson
Date: 2010-04-11 10:51:35 -0400 (Sun, 11 Apr 2010)
New Revision: 859
Modified:
constrictor/trunk/contrib/evergreen/eg_circ_misc.py
constrictor/trunk/contrib/evergreen/eg_tasks.py
Log:
added mvr retrieval task
Modified: constrictor/trunk/contrib/evergreen/eg_circ_misc.py
===================================================================
--- constrictor/trunk/contrib/evergreen/eg_circ_misc.py 2010-04-08 18:04:11 UTC (rev 858)
+++ constrictor/trunk/contrib/evergreen/eg_circ_misc.py 2010-04-11 14:51:35 UTC (rev 859)
@@ -2,6 +2,7 @@
import eg_utils
from eg_data import *
from eg_workflow import *
+import eg_tasks
import constrictor.log as log
eg_utils.init()
@@ -16,6 +17,9 @@
patron_id = dm.get_thread_data(PROP_PATRON_IDS)
copy_barcode = dm.get_thread_data(PROP_COPY_BARCODES, True)
+ bib = eg_tasks.BibRetrieveTask().start(bib_id = title_id)
+ if not bib: return False
+
# title hold
hold_id = doTitleHold(title_id, patron_id, pickup_lib)
if hold_id:
Modified: constrictor/trunk/contrib/evergreen/eg_tasks.py
===================================================================
--- constrictor/trunk/contrib/evergreen/eg_tasks.py 2010-04-08 18:04:11 UTC (rev 858)
+++ constrictor/trunk/contrib/evergreen/eg_tasks.py 2010-04-11 14:51:35 UTC (rev 859)
@@ -69,19 +69,18 @@
class TitleHoldPermitTask(AbstractMethodTask):
- def __init__(self):
- AbstractMethodTask.__init__(self)
- self.service = OILS_APP_CIRC
+ def __init__(self):
+ AbstractMethodTask.__init__(self)
+ self.service = OILS_APP_CIRC
self.method = 'open-ils.circ.title_hold.is_possible'
-
def run(self, **kw):
- ''' kw[title_id]
- kw[patron_id]
- kw[pickup_lib]
+ ''' kw[title_id]
+ kw[patron_id]
+ kw[pickup_lib]
'''
- return self.runMethod(eg_utils.authtoken(), {
- "patronid" : kw['patron_id'],
- "titleid" : kw['title_id'],
+ return self.runMethod(eg_utils.authtoken(), {
+ "patronid" : kw['patron_id'],
+ "titleid" : kw['title_id'],
"pickup_lib" : kw['pickup_lib']})
@@ -138,6 +137,17 @@
def run(self, **kw):
return self.runMethod(kw['search_args'], kw['search_term'], True)
+class BibRetrieveTask(AbstractMethodTask):
+
+ def __init__(self):
+ AbstractMethodTask.__init__(self)
+ self.service = OILS_APP_SEARCH
+ self.method = 'open-ils.search.biblio.record.mods_slim.retrieve'
+
+ def run(self, **kw):
+ return self.runMethod(kw['bib_id'])
+
+
class UserTransactionsByType(AbstractMethodTask):
def __init__(self):
More information about the open-ils-commits
mailing list