From 2194bc4a019fcc1de191c76ab8a905b04b029292 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sun, 9 Sep 2018 03:23:12 +0400 Subject: Refactoring the event handler Event processing is asynchronous. For asynchronous processing, events are added to the job queue. Signed-off-by: Valentin Popov --- db/events.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'db') diff --git a/db/events.php b/db/events.php index a2313c2..9fdf7d4 100644 --- a/db/events.php +++ b/db/events.php @@ -15,21 +15,18 @@ // along with Moodle. If not, see . /** - * Interception of all events in the system. + * Registration of observers for events. * - * @package local_webhooks - * @copyright 2017 "Valentin Popov" + * @copyright 2018 'Valentin Popov' * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package local_webhooks */ -defined("MOODLE_INTERNAL") || die(); +defined( "MOODLE_INTERNAL" ) || die(); $observers = array( array( - "callback" => "\local_webhooks\\handler::events", - "eventname" => "*", - "includefile" => null, - "internal" => true, - "priority" => 200 + "callback" => "\local_webhooks\\event_observer::observe_all", + "eventname" => "*" ) ); \ No newline at end of file -- cgit v1.2.3