Пример #1
0
def svc(app: Application) -> Iterator[Union[Iterator, Iterator[WhooshIndexService]]]:
    svc = app.services["indexing"]
    with app.app_context():
        svc.start()
        # pyre-fixme[7]: Expected `Iterator[Union[Iterator[Any],
        #  Iterator[WhooshIndexService]]]` but got `Generator[Service, None, None]`.
        yield svc
Пример #2
0
def svc(
    app: Application
) -> Iterator[Union[Iterator, Iterator[WhooshIndexService]]]:
    svc = app.services["indexing"]
    with app.app_context():
        svc.start()
        yield svc