浏览代码

Merge branch 'master' of git.oschina.net:yiguanjia/php

DengTao 8 年之前
父节点
当前提交
5566ff71e9
共有 2 个文件被更改,包括 0 次插入38 次删除
  1. 0 3
      webshell/pushListener.sh
  2. 0 35
      www/protected/commands/PushListenerCommand.php

+ 0 - 3
webshell/pushListener.sh

@@ -1,3 +0,0 @@
-#! /bin/bash
-cd /data/php/www/protected
-/usr/local/php/bin/php yiic pushlistener

+ 0 - 35
www/protected/commands/PushListenerCommand.php

@@ -1,35 +0,0 @@
-<?php
-/**
- * 消息推送监听脚本
- * @author   >
- */
-class PushListenerCommand extends CConsoleCommand{
-    public function run($args) {
-        error_reporting(E_ERROR);
-        ini_set('memory_limit', '512M');
-        ignore_user_abort(true);
-        set_time_limit(0);
-        $time_H = time();
-        while (true) {
-            sleep(2);
-            $time = time();
-            if($time - $time_H > 3600){
-                exit();
-            }
-            //信鸽消息推送队列,
-            $list = new ARedisList('xinge_push');
-            $z_push = new ZPush();
-            echo $list->getCount();
-            while ($list->getCount() > 0) {
-                try {
-                    $res = $list->pop();
-                    $data = unserialize($res);
-                    $result = $z_push->PushSingleAccountIOS($data['ios_data']);
-                    $result2 = $z_push->PushSingleAccountAndroid($data['android_data']); 
-                } catch (Exception $e) {
-                    continue;
-                }
-            }
-        }
-    }
-}