stanley-king 2 rokov pred
rodič
commit
3e33150d1b

+ 1 - 0
helper/refill/RefillBase.php

@@ -896,6 +896,7 @@ class RefillBase
         $this->mPolicy->update_chctl($params);
     }
 
+    //todo delete down lines
     public function UpdateRatio($ratios)
     {
         $this->mPolicy->update_ratios($ratios);

+ 5 - 2
rdispatcher/codispatcher.php

@@ -98,8 +98,11 @@ function subscribe_message(&$quit, &$redis, $channels)
                         $ins = Cache::getInstance('cacheredis');
                         $content = $ins->get_org('refill_channel_control_model');
 
-                        $data = json_decode($content,true);
-                        refill\RefillFactory::instance()->UpdateChctl($data);
+                        if(empty($content)) continue;
+                        $params = json_decode($content,true);
+                        if(empty($params)) continue;
+
+                        refill\RefillFactory::instance()->UpdateChctl($params);
                     }
                     else {
                         //Log::record("subscribe_message dont not handle mgs:{$sub_type}-{$channel}-{$type}",Log::DEBUG);