Protect against slony replication lag, LP#621448
authorMike Rylander <mrylander@gmail.com>
Tue, 8 Nov 2011 17:43:44 +0000 (12:43 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 8 Nov 2011 17:43:44 +0000 (12:43 -0500)
Make open-ils.circ.captured_holds.id_list.* API calls authoritative within
the staff client to avoid replication-lag related stale displays.  Inspired
by James Fournie at SITKA.

Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
Open-ILS/xul/staff_client/chrome/content/main/constants.js

index 8a0674a..9ed7f49 100644 (file)
@@ -1863,6 +1863,7 @@ __PACKAGE__->register_method(
     method    => 'fetch_captured_holds',
     api_name  => 'open-ils.circ.captured_holds.on_shelf.retrieve',
     stream    => 1,
+    authoritative => 1,
     signature => q/
                Returns a list of un-fulfilled holds (on the Holds Shelf) for a given title id
                @param authtoken The login session key
@@ -1874,6 +1875,7 @@ __PACKAGE__->register_method(
     method    => 'fetch_captured_holds',
     api_name  => 'open-ils.circ.captured_holds.id_list.on_shelf.retrieve',
     stream    => 1,
+    authoritative => 1,
     signature => q/
                Returns list ids of un-fulfilled holds (on the Holds Shelf) for a given title id
                @param authtoken The login session key
@@ -1885,6 +1887,7 @@ __PACKAGE__->register_method(
     method    => 'fetch_captured_holds',
     api_name  => 'open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve',
     stream    => 1,
+    authoritative => 1,
     signature => q/
                Returns list ids of shelf-expired un-fulfilled holds for a given title id
                @param authtoken The login session key
index 31142e7..1de4e6c 100644 (file)
@@ -144,8 +144,8 @@ var api = {
     'FM_AHR_ID_LIST_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.id_list.retrieve', 'secure' : false },
     'HTML_HOLD_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.print' },
     'FM_AHR_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.on_shelf.retrieve' },
-    'FM_AHR_ID_LIST_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.on_shelf.retrieve', 'secure' : false },
-    'FM_AHR_ID_LIST_EXPIRED_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve', 'secure' : false },
+    'FM_AHR_ID_LIST_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.on_shelf.retrieve.authoritative', 'secure' : false },
+    'FM_AHR_ID_LIST_EXPIRED_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve.authoritative', 'secure' : false },
     'FM_AHR_COUNT_FOR_BRE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.bre.holds.count', 'secure' : false },
     'FM_AHR_COUNT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.hold_requests.count', 'cacheable' : true, 'ttl' : 60000  },
     'FM_AHR_COUNT_RETRIEVE.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.hold_requests.count.authoritative', 'cacheable' : true, 'ttl' : 60000  },