platform notify

This commit is contained in:
cano
2024-03-27 00:11:26 +08:00
parent 01e93acdd8
commit 4b47fe7250
21 changed files with 462 additions and 18 deletions

View File

@ -5,7 +5,7 @@ use App\Bean\Model\Base\BaseBean;
class QueueBaseBean extends BaseBean
{
const TRY_LIMIT = 3;
protected $try_limt = 3;
protected $try_times = 0;
public function IncrTryTimes($num = 1): void
@ -15,11 +15,21 @@ class QueueBaseBean extends BaseBean
public function checkTryTimes(): bool
{
if($this->try_times >= self::TRY_LIMIT) {
if($this->try_times >= $this->try_limt) {
return false;
}
return true;
}
public function getTryTimes(): int
{
return $this->try_times;
}
function getDelaySeconds($seconds = 30): int
{
return $seconds * $this->try_times;
}
}