mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 09:55:33 +02:00
MDL-16799 - Unit tests failing on events testing - caused by handler caching; merged from MOODLE_19_STABLE
This commit is contained in:
parent
969ca8b3eb
commit
779ad29f99
@ -424,6 +424,8 @@ function events_trigger($eventname, $eventdata) {
|
||||
// ok, queue is empty, lets reset the status back to 0 == ok
|
||||
$handler->status = 0;
|
||||
$DB->set_field('events_handlers', 'status', 0, array('id'=>$handler->id));
|
||||
// reset static handler cache
|
||||
events_get_handlers('reset');
|
||||
}
|
||||
}
|
||||
|
||||
@ -435,11 +437,15 @@ function events_trigger($eventname, $eventdata) {
|
||||
}
|
||||
// set error count to 1 == send next instant into cron queue
|
||||
$DB->set_field('events_handlers', 'status', 1, array('id'=>$handler->id));
|
||||
// reset static handler cache
|
||||
events_get_handlers('reset');
|
||||
|
||||
} else {
|
||||
// increment the error status counter
|
||||
$handler->status++;
|
||||
$DB->set_field('events_handlers', 'status', $handler->status, array('id'=>$handler->id));
|
||||
// reset static handler cache
|
||||
events_get_handlers('reset');
|
||||
}
|
||||
|
||||
// update the failed counter
|
||||
|
Loading…
x
Reference in New Issue
Block a user