bourse stock
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
752 B

<?php
namespace app\home\job;
use app\home\service\TrcPayService;
use think\facade\Cache;
use think\facade\Log;
use think\queue\Job;
class Wallet
{
public function fire(Job $job, $data)
{
trace('钱包新任务', 'info');
for($times = 1; $times <= 10; $times++) {
$result=(new TrcPayService())->WalletAddress();
if(!empty($result)){
break;
}
trace($job->getJobId().'---获取钱包任务-----'.$times, 'info');
}
// 删除任务
$job->delete();
}
public function failed($data)
{
// 失败任务
$dataStr = json_encode($data);
trace('queue job 获取钱包任务失败---'.$dataStr, 'error');
}
}