改名
This commit is contained in:
@@ -179,18 +179,16 @@ class Pagination extends Component
|
|||||||
private function executed($callback, $data, $param)
|
private function executed($callback, $data, $param)
|
||||||
{
|
{
|
||||||
$this->_group->add(1);
|
$this->_group->add(1);
|
||||||
return Coroutine::create(function ($callback, $data, $param) {
|
return Coroutine::create(function ($callback, $data, $param): void {
|
||||||
|
Coroutine::defer([$this, 'done']);
|
||||||
try {
|
try {
|
||||||
call_user_func($callback, $data, $param);
|
call_user_func($callback, $data, $param);
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->addError($exception->getMessage());
|
$this->addError($exception->getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
$this->_group->done();
|
|
||||||
$event = Snowflake::app()->getEvent();
|
$event = Snowflake::app()->getEvent();
|
||||||
if (!$event->exists(Event::EVENT_AFTER_REQUEST)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$event->trigger(Event::EVENT_AFTER_REQUEST);
|
$event->trigger(Event::EVENT_AFTER_REQUEST);
|
||||||
|
$this->_group->done();
|
||||||
}
|
}
|
||||||
}, $callback, $data, $param);
|
}, $callback, $data, $param);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user