Begin adding schedule processing jobs.

This commit is contained in:
Dane Everitt 2017-09-16 23:10:00 -05:00
parent c0d7e02481
commit c5f2dfd6f6
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
16 changed files with 626 additions and 49 deletions

View file

@ -41,4 +41,12 @@ interface ScheduleRepositoryInterface extends RepositoryInterface
* @return \Illuminate\Support\Collection
*/
public function getScheduleWithTasks($schedule);
/**
* Return all of the schedules that should be processed.
*
* @param string $timestamp
* @return \Illuminate\Support\Collection
*/
public function getSchedulesToProcess($timestamp);
}

View file

@ -26,4 +26,22 @@ namespace Pterodactyl\Contracts\Repository;
interface TaskRepositoryInterface extends RepositoryInterface
{
/**
* Get a task and the server relationship for that task.
*
* @param int $id
* @return \Pterodactyl\Models\Task
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getTaskWithServer($id);
/**
* Returns the next task in a schedule.
*
* @param int $schedule the ID of the schedule to select the next task from
* @param int $index the index of the current task
* @return null|\Pterodactyl\Models\Task
*/
public function getNextTask($schedule, $index);
}