def ad_hoc():
    multiverse.init()  # New Cards?
    multiverse.set_legal_cards()  # PD current list
    multiverse.update_pd_legality()  # PD previous lists
    reprime_cache.run()  # Update deck legalities
    insert_seasons.run()  # Make sure Season table is up to date
    redis.REDIS.flushdb()  # Clear the redis cache
Esempio n. 2
0
async def rotate(ctx: MtgContext) -> None:
    """Perform all necessary post-rotation tasks."""
    await ctx.send('Rotating. This may take a while…')
    multiverse.init() # New Cards?
    multiverse.set_legal_cards() # PD current list
    multiverse.update_pd_legality() # PD previous lists
    if redis.REDIS:
        redis.REDIS.flushdb() # type: ignore, Clear the redis cache
    await ctx.send('Rotation complete. You probably want to restart me.')
Esempio n. 3
0
def ad_hoc() -> None:
    league.set_status(league.Status.CLOSED)
    multiverse.init()  # New Cards?
    multiverse.set_legal_cards()  # PD current list
    multiverse.update_pd_legality()  # PD previous lists
    reprime_cache.run()  # Update deck legalities
    insert_seasons.run()  # Make sure Season table is up to date
    if redis.REDIS:
        redis.REDIS.flushdb()  # type: ignore, Clear the redis cache
    league.set_status(league.Status.OPEN)
def ad_hoc():
    multiverse.init()  # New Cards?
    multiverse.set_legal_cards()  # PD current list
    multiverse.update_pd_legality()  # PD previous lists
    reprime_cache.run()  # Update deck legalities