Open davidemarcoli opened 4 days ago
The changes introduce a new scheduling mechanism within the Program
class by adding a private member variable _scheduler
of type _SpecialEventScheduler
. This new scheduler replaces the previous scheduling system, centralizing task management and enhancing error handling in the database initialization process. Additionally, a new file is created to define the _SpecialEventScheduler
class, which manages special events and their scheduling. The overall control flow remains unchanged, but the structure of the scheduling logic is refined for better maintainability.
File | Change Summary |
---|---|
src/program/program.py |
Added _scheduler variable; modified start , _schedule_services , _schedule_functions , and run methods to utilize the new scheduler; enhanced error handling in _init_db_from_symlinks . |
src/program/_special_event_scheduler.py |
Introduced _SpecialEventScheduler class and SpecialEvent data class; added methods for setting up schedulers, calculating next event dates, and adding media items. |
sequenceDiagram
participant Program
participant _SpecialEventScheduler
Program->>_SpecialEventScheduler: Initialize
Program->>_SpecialEventScheduler: Setup Schedulers
_SpecialEventScheduler->>Program: Return Scheduler
Program->>_SpecialEventScheduler: Schedule Event
_SpecialEventScheduler->>Program: Event Scheduled
🐰 "In the meadow where bunnies play,
A new scheduler hops in today!
With events to manage, oh what a sight,
Special moments, all set just right.
So let’s celebrate with a joyful cheer,
For the changes that bring us all near!" 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Pull Request Check List
Resolves: #issue-number-here
Description:
Summary by CodeRabbit
New Features
Bug Fixes
Refactor