Awight has uploaded a new change for review.
https://gerrit.wikimedia.org/r/233833
Change subject: Check Stomp API result
......................................................................
Check Stomp API result
Tiny bit of error handling.
Bug: T109901
Change-Id: I64ca28b583ccd061cee9487eb706d72800a62d9f
---
M src/PHPQueue/Backend/Stomp.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/php-queue
refs/changes/33/233833/1
diff --git a/src/PHPQueue/Backend/Stomp.php b/src/PHPQueue/Backend/Stomp.php
index 53a4cc4..e855af3 100644
--- a/src/PHPQueue/Backend/Stomp.php
+++ b/src/PHPQueue/Backend/Stomp.php
@@ -114,7 +114,10 @@
if ($properties === null) {
$properties = array('ack' => 'client');
}
- $this->getConnection()->subscribe($this->queue_name, $properties);
+ $result = $this->getConnection()->subscribe($this->queue_name,
$properties);
+ if (!$result) {
+ throw new BackendException("No response when subscribing to queue
{$this->queue_name}");
+ }
if ($this->read_timeout) {
$this->getConnection()->setReadTimeout($this->read_timeout);
}
--
To view, visit https://gerrit.wikimedia.org/r/233833
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I64ca28b583ccd061cee9487eb706d72800a62d9f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits