Adds a startup handler to the hug api
(self, handler)
| 614 | self.add_startup_handler(startup_handler) |
| 615 | |
| 616 | def add_startup_handler(self, handler): |
| 617 | """Adds a startup handler to the hug api""" |
| 618 | if not self.startup_handlers: |
| 619 | self._startup_handlers = [] |
| 620 | |
| 621 | self.startup_handlers.append(handler) |
| 622 | |
| 623 | def _ensure_started(self): |
| 624 | """Marks the API as started and runs all startup handlers""" |
no outgoing calls
no test coverage detected