Many misc fixes
This commit is contained in:
@@ -70,11 +70,17 @@ class Service_Traffic_ADSL {
|
||||
* Traffic data from supplier
|
||||
*/
|
||||
public function update_traffic() {
|
||||
if (CLI::options('verbose'))
|
||||
echo ' - Last: '.date('Y-m-d',strtotime($this->last_update().'+1 day'))."\n";
|
||||
|
||||
$alreadyrun = FALSE;
|
||||
for ($querydate=date('Y-m-d',strtotime($this->last_update().'+1 day'));
|
||||
$querydate<=$this->today;
|
||||
$querydate=date('Y-m-d',strtotime($querydate.'+1 day'))) {
|
||||
|
||||
if (CLI::options('verbose'))
|
||||
echo " - Date: $querydate\n";
|
||||
|
||||
$goodfetch = false;
|
||||
// @todo log this fetch in a "log"
|
||||
|
||||
@@ -82,6 +88,9 @@ class Service_Traffic_ADSL {
|
||||
// Data returned should be in MB's
|
||||
$data = $this->getdata($querydate);
|
||||
|
||||
if (CLI::options('verbose'))
|
||||
print_r($data);
|
||||
|
||||
if (! $this->fetchresult) {
|
||||
echo 'Bad fetch'.get_class($this);
|
||||
break;
|
||||
|
@@ -39,6 +39,9 @@ class Service_Traffic_ADSL_ExetelHSPA extends Service_Traffic_ADSL {
|
||||
$update = array();
|
||||
|
||||
foreach ($this->so->services() as $so) {
|
||||
if (CLI::options('verbose'))
|
||||
echo " = Service: ".$so->name()."\n";
|
||||
|
||||
if ($so->plugin()->service_stats_collect AND $so->plugin()->service_stats_lastupdate < $date) {
|
||||
// Start Session
|
||||
$request = Request::factory($this->so->stats_url)
|
||||
|
Reference in New Issue
Block a user