Example #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
Example #2
0
def svc(
    app: Application
) -> Iterator[Union[Iterator, Iterator[WhooshIndexService]]]:
    svc = app.services["indexing"]
    with app.app_context():
        svc.start()
        yield svc