aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-09-09 02:23:12 +0300
committerValentin Popov <info@valentineus.link>2018-09-09 02:23:12 +0300
commit2194bc4a019fcc1de191c76ab8a905b04b029292 (patch)
treed44b5c17dbd2e6e3d51c6eb40aa1ed080c26dd5d /db
parent5884a58f544300f6674dc5bdcadfc16e8109749e (diff)
downloadlocal_webhooks-2194bc4a019fcc1de191c76ab8a905b04b029292.tar.xz
local_webhooks-2194bc4a019fcc1de191c76ab8a905b04b029292.zip
Refactoring the event handler
Event processing is asynchronous. For asynchronous processing, events are added to the job queue. Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'db')
-rw-r--r--db/events.php15
1 files changed, 6 insertions, 9 deletions
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 <http://www.gnu.org/licenses/>.
/**
- * Interception of all events in the system.
+ * Registration of observers for events.
*
- * @package local_webhooks
- * @copyright 2017 "Valentin Popov" <info@valentineus.link>
+ * @copyright 2018 'Valentin Popov' <info@valentineus.link>
* @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