stanley-king 4 years ago
parent
commit
863c5aea1a
1 changed files with 26 additions and 0 deletions
  1. 26 0
      queue/daemon.php

+ 26 - 0
queue/daemon.php

@@ -0,0 +1,26 @@
+<?php
+
+class Daemon{
+
+    protected $handler = null;
+
+    public function init(){
+        $this->handler = new \Redis();
+        $this->handler->connect('39.97.239.116', 6379);
+        $this->handler->auth('huaxiashangmeng');
+        $this->handler->select(1);
+    }
+
+    public function btoc($listname){
+        $result = $this->handler->BRPOP($listname,0);
+        if($result){
+
+        }
+    }
+}
+
+$daemon = new Daemon();
+$daemon->init();
+while (true){
+
+}