scan(); if (!empty($list_key) && is_array($list_key)) { foreach ($list_key as $key) { $content = $worker->pop($list_key, 0); if (empty($content)) continue; $method = key($content); $arg = current($content); // $model_queue->$method($arg); echo date('Y-m-d H:i:s',time()).' '.$method."\n"; flush(); ob_flush(); } } sleep(1); } } public function testPush() { //{"action":"sendreq","params":null} $x['action'] = 'sendreq'; $x['params'] = ['speed' => 30]; $y = json_encode($x); $param['member_id'] = 36490; $param['text'] = "红包退还通知:您发送的红包已超过24小时,退还未被领取的金额1234元,请在收支明细中查看."; $param['go_type'] = ''; QueueClient::push('upushSendMsg',$param); } public function testOrderSuccess() { $mod = Model('order'); $pay_sn = '270563196360813623'; $order_info = $mod->getOrderInfo(array('pay_sn' => $pay_sn)); $logic_order = Logic('order'); $result = $logic_order->changeOrderStateReceive($order_info,'system','系统','超期未收货系统自动完成订单'); } public function testRefund() { $client = Logic('queue'); $client->QueryRefund(['order_id' => 1140016194]); } }