Execute the callback with the prepared arguments.
(self, func, args, outputs_list, g)
| 1595 | return grouping, using_grouping |
| 1596 | |
| 1597 | def _execute_callback(self, func, args, outputs_list, g): |
| 1598 | """Execute the callback with the prepared arguments.""" |
| 1599 | g.custom_data = AttributeDict({}) |
| 1600 | |
| 1601 | for hook in self._hooks.get_hooks("custom_data"): |
| 1602 | g.custom_data[hook.data["namespace"]] = hook(g) |
| 1603 | |
| 1604 | # noinspection PyArgumentList |
| 1605 | partial_func = functools.partial( |
| 1606 | func, |
| 1607 | *args, |
| 1608 | outputs_list=outputs_list, |
| 1609 | background_callback_manager=g.background_callback_manager, |
| 1610 | callback_context=g, |
| 1611 | app=self, |
| 1612 | app_on_error=self._on_error, |
| 1613 | app_use_async=self._use_async, |
| 1614 | ) |
| 1615 | return partial_func |
| 1616 | |
| 1617 | def _setup_server(self): |
| 1618 | if self._got_first_request["setup_server"]: |
no test coverage detected