async def update(self, channel: TextChannel, **_: Dict[str, Any]) -> None: """Forces an update to legal cards and bugs.""" oracle.legal_cards(force=True) multiverse.update_bugged_cards() multiverse.update_cache() multiverse.reindex() oracle.init(force=True) await channel.send('Reloaded legal cards and bugs.')
async def update(ctx: MtgContext) -> None: """Forces an update to legal cards and bugs.""" await ctx.send('Begun reloading legal cards and bugs.') multiverse.set_legal_cards() oracle.legal_cards(force=True) multiverse.update_bugged_cards() multiverse.rebuild_cache() multiverse.reindex() oracle.init(force=True) await ctx.send('Reloaded legal cards and bugs.')
def run(): start = time.time() multiverse.reindex() end = time.time() print('Indexing done in {t} seconds'.format(t=(end - start)))
def setUpClass(cls) -> None: try: cls.searcher = WhooshSearcher() # type: ignore except whoosh.index.EmptyIndexError: # Whoosh hasn't been initialized yet! multiverse.reindex() cls.searcher = WhooshSearcher() # type: ignore