MDL-16799 - Unit tests failing on events testing - caused by handler caching; merged from MOODLE_19_STABLE
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user