Events Handlers Table Schema (events_handlers)


Description

This table is for storing which components requests what type of event, and the location of the responsible handlers. For example, the assignment registers 'grade_updated' event with a function assignment_grade_handler() that should be called event time an 'grade_updated' event is triggered by grade_update() function.

events_handlers table columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigint 10 null
events_queue_handlers.handlerid evenqueuhand_han2_fk R
eventname varchar 166

name of the event, e.g. 'grade_updated'

component varchar 166

e.g. moodle, mod_forum, block_rss_client

handlerfile varchar 255

path to the file of the function, eg /grade/export/lib.php

handlerfunction longtext 2147483647 null

serialized string or array describing function, suitable to be passed to call_user_func()

schedule varchar 255 null

'cron' or 'instant'.

status bigint 10 0

number of failed attempts to process this handler

internal tinyint 2 1

1 means standard plugin handler, 0 indicates if event handler sends data to external systems, this is used for example to prevent immediate sending of events from pending db transactions

Table contained -1 rows

events_handlers table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
evenhand_evecom_uix Must be unique Asc/Asc eventname + component

events_handlers table relationships