Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/184095

Change subject: MWException -> Exception
......................................................................

MWException -> Exception

Change-Id: Ice40c8aa7fb595c861b31edd522d4723f2163cce
---
D PoolCounter.php
A PoolCounter.php
M PoolCounterClient_body.php
3 files changed, 48 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PoolCounter 
refs/changes/95/184095/1

diff --git a/PoolCounter.php b/PoolCounter.php
deleted file mode 120000
index e390419..0000000
--- a/PoolCounter.php
+++ /dev/null
@@ -1 +0,0 @@
-PoolCounterClient.php
\ No newline at end of file
diff --git a/PoolCounter.php b/PoolCounter.php
new file mode 100755
index 0000000..f5b0019
--- /dev/null
+++ b/PoolCounter.php
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * MediaWiki client for the pool counter daemon poolcounter.py.
+ */
+
+$wgExtensionCredits['other'][] = array(
+       'path'           => __FILE__,
+       'name'           => 'Pool Counter Client',
+       'author'         => 'Tim Starling',
+       'descriptionmsg' => 'poolcounter-desc',
+       'url'            => 
'https://www.mediawiki.org/wiki/Extension:PoolCounter',
+);
+
+
+/**
+ * Configuration array for the connection manager.
+ * Use $wgPoolCounterConf to configure the pools.
+ */
+$wgPoolCountClientConf = array(
+       /**
+        * Array of hostnames, or hostname:port. The default port is 7531.
+        */
+       'servers' => array( '127.0.0.1' ),
+
+       /**
+        * Connect timeout
+        */
+       'timeout' => 0.1,
+);
+
+/**
+ * Sample pool configuration:
+ *   $wgPoolCounterConf = array( 'ArticleView' => array(
+ *     'class' => 'PoolCounter_Client',
+ *     'timeout' => 15, // wait timeout in seconds
+ *     'workers' => 5, // maximum number of active threads in each pool
+ *     'maxqueue' => 50, // maximum number of total threads in each pool
+ *   ) );
+ */
+
+$dir = __DIR__ . '/';
+$wgAutoloadClasses['PoolCounter_ConnectionManager']
+       = $wgAutoloadClasses['PoolCounter_Client']
+       = $dir . 'PoolCounterClient_body.php';
+$wgMessagesDirs['PoolCounterClient'] = __DIR__ . '/i18n';
+$wgExtensionMessagesFiles['PoolCounterClient'] = $dir . 
'PoolCounterClient.i18n.php';
diff --git a/PoolCounterClient_body.php b/PoolCounterClient_body.php
index 23f9c5d..8a41251 100644
--- a/PoolCounterClient_body.php
+++ b/PoolCounterClient_body.php
@@ -9,7 +9,7 @@
                $this->hostNames = $conf['servers'];
                $this->timeout = isset( $conf['timeout'] ) ? $conf['timeout'] : 
0.1;
                if ( !count( $this->hostNames ) ) {
-                       throw new MWException( __METHOD__ . ': no servers 
configured' );
+                       throw new Exception( __METHOD__ . ': no servers 
configured' );
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/184095
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice40c8aa7fb595c861b31edd522d4723f2163cce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PoolCounter
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <o...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to