Laravel 10 (#4706)
This commit is contained in:
parent
ad4ddc6300
commit
1d38b4f0e2
136 changed files with 1735 additions and 2008 deletions
|
@ -6,7 +6,6 @@ use Exception;
|
|||
use Pterodactyl\Jobs\Job;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Pterodactyl\Models\Task;
|
||||
use InvalidArgumentException;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
@ -72,9 +71,9 @@ class RunTaskJob extends Job implements ShouldQueue
|
|||
$backupService->setIgnoredFiles(explode(PHP_EOL, $this->task->payload))->handle($server, null, true);
|
||||
break;
|
||||
default:
|
||||
throw new InvalidArgumentException('Invalid task action provided: ' . $this->task->action);
|
||||
throw new \InvalidArgumentException('Invalid task action provided: ' . $this->task->action);
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
// If this isn't a DaemonConnectionException on a task that allows for failures
|
||||
// throw the exception back up the chain so that the task is stopped.
|
||||
if (!($this->task->continue_on_failure && $exception instanceof DaemonConnectionException)) {
|
||||
|
@ -89,7 +88,7 @@ class RunTaskJob extends Job implements ShouldQueue
|
|||
/**
|
||||
* Handle a failure while sending the action to the daemon or otherwise processing the job.
|
||||
*/
|
||||
public function failed(Exception $exception = null)
|
||||
public function failed(\Exception $exception = null)
|
||||
{
|
||||
$this->markTaskNotQueued();
|
||||
$this->markScheduleComplete();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue