mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? <!-- Describe what has changed in this PR --> - Drop scheduled tasks if it's scheduled to run far in the future ( duration > 99 year ) - What if we want to recover those timers? - Do a namespace migration, that will re-create all the timers. ## Why? <!-- Tell your future self why have you made these changes --> - There's no point creating those timers. They just consume storage spaces. Persistence implementations also don't have a good way for handling them. - #4775 capped all timer settings to MaxAllowTimer for new workflows. But if workflows are created before that check is added, we may still create timers for those large durations. E.g. the new logic added for creating workflow execution timeout timer based on the persisted workflow execution expiration time. - NOTE: all capped timers will be dropped as well. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Added unit test ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - Yes