2017-09-10 04:55:21 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
2018-01-05 04:49:50 +00:00
|
|
|
use Pterodactyl\Models\Task;
|
|
|
|
|
2017-09-10 04:55:21 +00:00
|
|
|
interface TaskRepositoryInterface extends RepositoryInterface
|
|
|
|
{
|
2017-09-17 04:10:00 +00:00
|
|
|
/**
|
|
|
|
* Get a task and the server relationship for that task.
|
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
2018-01-09 03:43:10 +00:00
|
|
|
public function getTaskForJobProcess(int $id): Task;
|
2017-09-17 04:10:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the next task in a schedule.
|
|
|
|
*
|
2020-06-28 22:43:44 +00:00
|
|
|
* @return \Pterodactyl\Models\Task|null
|
2017-09-17 04:10:00 +00:00
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getNextTask(int $schedule, int $index);
|
2017-09-10 04:55:21 +00:00
|
|
|
}
|