%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/public_html/admin1/vendor/spatie/laravel-backup/src/Traits/ |
Upload File : |
<?php
namespace Spatie\Backup\Traits;
use Illuminate\Support\Sleep;
trait Retryable
{
protected int $tries = 1;
protected int $currentTry = 1;
protected function shouldRetry()
{
if ($this->tries <= 1) {
return false;
}
return $this->currentTry < $this->tries;
}
protected function hasRetryDelay(string $type)
{
return ! empty($this->getRetryDelay($type));
}
protected function sleepFor(int $seconds = 0)
{
Sleep::for($seconds)->seconds();
}
protected function setTries(string $type)
{
if ($this->option('tries')) {
$this->tries = (int)$this->option('tries');
return;
}
$this->tries = (int)config('backup.' . $type . '.tries', 1);
}
protected function getRetryDelay(string $type)
{
return (int)config('backup.' . $type . '.retry_delay', 0);
}
}