Commit 3d12378c by haojie

1

parent c017b59d
......@@ -10,12 +10,11 @@ class CheckArrivalCl
{
public function check($hash, $price, $address, $to)
{
Log::error('执行异步任务');
# 添加订单后--查询是否到账--最多检测20次
for ($i = 1; $i <= 10; $i++) {
$type = self::IntervalCheck($hash, $price, $address, $to);
Log::error($type);
if ($type) {
Log::error('购买成功');
break;
}
sleep(1);
......@@ -32,7 +31,6 @@ public function IntervalCheck($hash, $price, $address, $to)
if ($item->status == 1) {
return true;
}
Log::error('插入redis');
# 获取交易
$obj = (object)[];
$obj->hash = $hash;
......
......@@ -25,11 +25,11 @@ class CheckArrival implements ShouldQueue
*/
public function __construct(string $hash, int $price, string $address, string $to)
{
$this->queue = "{check-arrival}";
$this->hash = $hash;
$this->price = $price;
$this->address = $address;
$this->to = $to;
$this->queue = "{check-check-arrival}";
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment