Some improvements ...
authorRoland Haeder <roland@mxchange.org>
Thu, 21 May 2015 01:36:41 +0000 (03:36 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 21 May 2015 01:36:41 +0000 (03:36 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
contrib/exp/exp2.php
inc/classes/main/handler/tasks/class_TaskHandler.php

index 03b7108..b6040fc 100644 (file)
@@ -5,7 +5,7 @@ bcscale(20);
 
 $balance = 1;
 $years = 100;
-$rate = 0.05;
+$rate = 0.02;
 
 $totalMonths = $years * 12;
 
index 9fd650a..1f95813 100644 (file)
@@ -114,8 +114,11 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                // Get time difference from interval delay
                $diff = ($this->getMilliTime() - $currentTask['task_last_activity']) * 1000;
 
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' diff=' . $diff . ',task_interval_delay=' . $currentTask['task_interval_delay'] . ',task_max_runs=' . $currentTask['task_max_runs'] . ',task_total_runs=' . $currentTask['task_total_runs']);
+
                // Is the interval delay reached?
-               if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_total_runs'] == $currentTask['task_max_runs']) && ($currentTask['task_max_runs'] > 0))) {
+               if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_max_runs'] > 0) && ($currentTask['task_total_runs'] == $currentTask['task_max_runs']))) {
                        // Should we update the task from startup?
                        if ($updateTask === TRUE) {
                                // Update the task before leaving