Repository navigation
0.17.4 - I love it when a plan comes together
Big thanks to @omikader who's been a partner in thinking through some big refactorings, culminating in a very clean addition of a new Cron dependency!
from docket.dependencies import Cron
async def hourly_session_cleanup(cron: Cron = Cron("15 * * * *")):
... clean up user sessions at the :15 mark of every hour ...
# @daily is equivalent to "0 0 * * *" (midnight every day)
async def daily_report(cron: Cron = Cron("@daily")):
... run the daily report ...Cron dependencies default to automatic=True (so they just automatically get scheduled for their next appropriate run) but you can disable them if you want more control by setting automatic=False.
What's Changed
- Add internal state invariant tests and reorganize test directories by @chrisguidry in #310
- Add Cron dependency for cron-style task scheduling by @omikader in #311
New Contributors
Full Changelog: 0.17.3...0.17.4
