]> git.mxchange.org Git - hub.git/commitdiff
Some fixes:
authorRoland Häder <roland@mxchange.org>
Mon, 22 Jul 2013 00:18:57 +0000 (00:18 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 22 Jul 2013 00:18:57 +0000 (00:18 +0000)
- added missing interface
- added missing space (convention)
- used constant for queu name
- reduced work unit size

application/hub/config.php
application/hub/main/cruncher/class_BaseHubCruncher.php
application/hub/main/database/wrapper/cruncher/class_CruncherUnitDatabaseWrapper.php
application/hub/main/producer/class_BaseProducer.php

index 8c9e480604c14449d6eaaea01f375f2c94423175..04d5b8f6deccdb0dcc5f102e919f59809212a75d 100644 (file)
@@ -920,6 +920,9 @@ $cfg->setConfigEntry('cruncher_test_unit_template_type', 'xml/cruncher/producer'
 // CFG: STACKER-CRUNCHER-TEST-UNIT-MAX-SIZE
 $cfg->setConfigEntry('stacker_cruncher_test_unit_max_size', 20);
 
+// CFG: STACKER-OUTGOING-QUEUE-MAX-SIZE
+$cfg->setConfigEntry('stacker_outgoing_queue_max_size', 2000);
+
 // CFG: CRUNCHER-TEST-UNIT-MAX-COUNT
 $cfg->setConfigEntry('cruncher_test_unit_max_count', 1000);
 
@@ -951,7 +954,7 @@ $cfg->setConfigEntry('cruncher_init_state_class', 'CruncherInitState');
 $cfg->setConfigEntry('cruncher_virgin_state_class', 'CruncherVirginState');
 
 // CFG: CRUNCHER-PER-UNIT-KEY-LIMIT
-$cfg->setConfigEntry('cruncher_per_unit_key_limit', 10000);
+$cfg->setConfigEntry('cruncher_per_unit_key_limit', 1000);
 
 ///////////////////////////////////////////////////////////////////////////////
 //                            Chat Configuration
index 4f55a45a50fc20bcc40d07a21dabbddb93e295fc..1b6bdab093cf47df978c53190940d800824361d5 100644 (file)
@@ -98,7 +98,7 @@ abstract class BaseHubCruncher extends BaseHubSystem implements Updateable {
         */
        protected function isInBufferQueueFilled () {
                // Determine it
-               $isFilled = ($this->bufferInstance->getStackCount('in_queue') > $this->getConfigInstance()->getConfigEntry('cruncher_in_buffer_min_threshold'));
+               $isFilled = ($this->bufferInstance->getStackCount(self::STACKER_NAME_IN_QUEUE) > $this->getConfigInstance()->getConfigEntry('cruncher_in_buffer_min_threshold'));
 
                // And return the result
                return $isFilled;
index f99b2f0e182b7314df73447bd7585b3b60c5744c..0d1b0513a98c1be20d766ebd6328f7e7b18b4884 100644 (file)
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class CruncherUnitDatabaseWrapper extends BaseDatabaseWrapper implements UnitDatabaseWrapper {
+class CruncherUnitDatabaseWrapper extends BaseDatabaseWrapper implements UnitDatabaseWrapper, Registerable {
        // Constants for database table names
        const DB_TABLE_CRUNCHER_UNITS = 'cruncher_units';
 
index 38f8c9b68bb0173a2a568f579c0c80e0e665d390..1045a0153a8f9a46985a76980a57549c1a9805c1 100644 (file)
@@ -152,7 +152,7 @@ abstract class BaseProducer extends BaseFrameworkSystem {
         * @param       $configEntry    Configuration entry where the limit is stored
         * @return      $isReached              Whether the limit is reached
         */
-       protected function isOutgoingQueueLimitReached($configEntry) {
+       protected function isOutgoingQueueLimitReached ($configEntry) {
                return ($this->getConfigInstance()->getConfigEntry($configEntry) <= $this->getOutgoingQueueInstance()->getStackCount(self::STACKER_NAME_OUT_QUEUE));
        }