andre 2 лет назад
Родитель
Сommit
d71f7cd7eb
1 измененных файлов с 9 добавлено и 10 удалено
  1. 9 10
      app/Http/Actions/UsageUpdate.php

+ 9 - 10
app/Http/Actions/UsageUpdate.php

@@ -14,7 +14,15 @@ class UsageUpdate extends AddonController
     public function execute($params = null)
     {
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
-        
+
+        logModuleCall(
+            'kerioEmail',
+            __FUNCTION__,
+            $params,
+            'Debug Usage',
+            $api
+        );
+
         try {
             $api->login($params['serverhostname'], $params['serverusername'], $params['serverpassword']);
             $domains = $api->getDomains(['id','name']);
@@ -68,15 +76,6 @@ class UsageUpdate extends AddonController
 
                 Whmcs\Hosting::where('server', $serverId)->where('domain', $domainName)->update(['bwusage' => $mailboxes]);
                 Whmcs\Hosting::where('server', $serverId)->where('domain', $domainName)->update(['diskusage' => $storage]);
-
-                logModuleCall(
-                    'kerioEmail',
-                    __FUNCTION__,
-                    $storage,
-                    'Debug Usage',
-                    $mailboxes
-                );
-
                 usleep(5000);
             }
             catch (\Exception $ex)