DengTao há 8 anos atrás
pai
commit
96c2470b2d
1 ficheiros alterados com 7 adições e 6 exclusões
  1. 7 6
      www/protected/commands/getPetUserWorkCommand.php

+ 7 - 6
www/protected/commands/getPetUserWorkCommand.php

@@ -11,7 +11,7 @@ class GetPetUserWorkCommand extends CConsoleCommand{
         ini_set('memory_limit', '256M');
         //ini_set('mongo.long_as_object',1);
         set_time_limit(0);
-        $this->getKennel();
+        $this->getPetUser();
 
 
     }
@@ -77,10 +77,12 @@ class GetPetUserWorkCommand extends CConsoleCommand{
         }
     }
     public function getPetUser(){
-        Yii::app()->redis->set('testcache', 1);//默认有效期为一年
-
-        var_dump(Yii::app()->redis->get('testcache'));exit;
-        /*$m = new MongoClient(DB_CONNETC);
+        $m = new MongoClient(DB_CONNETC);
+        $collection = $m->selectCollection('fuwu','material');
+        $collection->drop();
+        $c = $m->selectCollection('fuwu','stock');
+        $c->drop();
+      /*  $m = new MongoClient(DB_CONNETC);
         $count = 0;
         $collection = $m->selectCollection('cute','pet_user');
         $cursor = $collection->find();
@@ -123,7 +125,6 @@ class GetPetUserWorkCommand extends CConsoleCommand{
                 }
             }
             sleep(3);
-
         }*/
     }