Open dolsysmith opened 3 years ago
Need to fix error that occurs at the end of the month:
ValueError: day is out of range for month
Traceback (most recent call last):
File "/opt/libcal_pp_integration/app.py", line 221, in <module>
scheduler.enterabs(get_next_midnight(), 2, cleanup, argument=(app, scheduler))
File "/opt/libcal_pp_integration/app.py", line 200, in get_next_midnight
midnight = datetime(today.year, today.month, today.day+1, 0, 0, 0).timestamp()
In order to support recurring appointments, we need to clear the
appts
table on a regular basis. (Recurring appointments from LibCal use the same ID, so the app currently discards any instances of a recurring appointment after the first.)Proposed implementation:
sqlite_cache.py
to clear theappts
table.app.py
add a new function to call the delete method and schedule itself for 24 hours from the current time