wallet tron transactions
This commit is contained in:
25
app/Bean/Queue/QueueBaseBean.php
Normal file
25
app/Bean/Queue/QueueBaseBean.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace App\Bean\Queue;
|
||||
|
||||
use App\Bean\Model\Base\BaseBean;
|
||||
|
||||
class QueueBaseBean extends BaseBean
|
||||
{
|
||||
const TRY_LIMIT = 3;
|
||||
protected $try_times = 0;
|
||||
|
||||
public function IncrTryTimes($num = 1): void
|
||||
{
|
||||
$this->try_times += $num;
|
||||
}
|
||||
|
||||
public function checkTryTimes(): bool
|
||||
{
|
||||
if($this->try_times >= self::TRY_LIMIT) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user