From 35ca26a70f7b0d2561f30856c74360d01e93267c Mon Sep 17 00:00:00 2001 From: Anton Timmermans Date: Tue, 12 Sep 2017 16:40:21 +0200 Subject: [PATCH] Add job handler interface This can be used to make sure the handlers conform to have the correct method. --- DJJob.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/DJJob.php b/DJJob.php index bbddc57..d755e29 100644 --- a/DJJob.php +++ b/DJJob.php @@ -16,6 +16,16 @@ public function getDelay() { } } +/** + * Job handler interface which can be safely enqueued. + */ +interface DJJobHandlerInterface { + /** + * Method that will perform the job when retrieved from the jobs table. + */ + public function perform(); +} + class DJBase { // error severity levels