Mwalker has uploaded a new change for review.
https://gerrit.wikimedia.org/r/63157
Change subject: Adding Disk Based Store
......................................................................
Adding Disk Based Store
Just for temporary status things -- does not yet implement queuing
functionality.
Change-Id: Iadb1db09a6aa30d2e98a7c1d91ed3aa194a3e0f4
---
M SmashPig/Core/DataStores/KeyedOpaqueDataStore.php
M SmashPig/Core/DataStores/StompDataStore.php
M SmashPig/config_defaults.php
3 files changed, 10 insertions(+), 4 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners
refs/changes/57/63157/1
diff --git a/SmashPig/Core/DataStores/KeyedOpaqueDataStore.php
b/SmashPig/Core/DataStores/KeyedOpaqueDataStore.php
index bdd04c2..ab049f6 100644
--- a/SmashPig/Core/DataStores/KeyedOpaqueDataStore.php
+++ b/SmashPig/Core/DataStores/KeyedOpaqueDataStore.php
@@ -17,7 +17,7 @@
abstract public function addObject( KeyedOpaqueStorableObject $obj );
/**
- * Remove object with the same serialization type and correlation ID
from the
+ * Remove objects with the same serialization type and correlation ID
from the
* persistent store.
*
* @param KeyedOpaqueStorableObject $protoObj Prototype to remove.
diff --git a/SmashPig/Core/DataStores/StompDataStore.php
b/SmashPig/Core/DataStores/StompDataStore.php
index 0cb7000..0abfab0 100644
--- a/SmashPig/Core/DataStores/StompDataStore.php
+++ b/SmashPig/Core/DataStores/StompDataStore.php
@@ -314,7 +314,13 @@
protected function deleteSubscription() {
if ( $this->subscribed ) {
Logger::debug( "Unsubscribing from STOMP queue
'{$this->queue_id}'" );
- $this->stompObj->unsubscribe( $this->queue_id );
+ try {
+ // Sometimes the resource has already been
destroyed by some other
+ // means and STOMP throws an exception.
+ $this->stompObj->unsubscribe( $this->queue_id );
+ } catch ( \Stomp_Exception $ex ) {
+ // Yay for generic errors! We never do that...
no... >.>
+ }
$this->subscribed = false;
}
}
diff --git a/SmashPig/config_defaults.php b/SmashPig/config_defaults.php
index bb5638f..2afaa5c 100644
--- a/SmashPig/config_defaults.php
+++ b/SmashPig/config_defaults.php
@@ -5,8 +5,8 @@
'data-store' => array(
// Store definitions
'pending' => array(
- 'class' =>
'SmashPig\Core\DataStores\StompDataStore',
- 'inst-args' => array( 'pending' ),
+ 'class' =>
'SmashPig\Core\DataStores\DiskFileDataStore',
+ 'inst-args' => array( '/tmp/' ),
),
'limbo' => array(
--
To view, visit https://gerrit.wikimedia.org/r/63157
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadb1db09a6aa30d2e98a7c1d91ed3aa194a3e0f4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/PaymentsListeners
Gerrit-Branch: master
Gerrit-Owner: Mwalker <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits