Add chore expiry notification system with scheduling and tests
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m59s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m59s
- Implemented `trigger_chore_expiry.py` script to manually trigger chore expiry notifications for users via the admin API. - Developed `chore_expiry_notification_scheduler.py` to handle the logic for sending notifications for chores expiring within the next 75 minutes. - Created utility functions in `schedule_utils.py` to determine scheduling and deadlines for chores. - Added comprehensive tests for the chore expiry notification system in `test_chore_expiry_notification_scheduler.py`, covering various scenarios including scheduled chores, confirmations, and user settings.
This commit is contained in:
@@ -26,6 +26,7 @@ from events.broadcaster import Broadcaster
|
||||
from events.sse import sse_response_for_user, send_to_user
|
||||
from api.utils import get_current_user_id
|
||||
from utils.account_deletion_scheduler import start_deletion_scheduler
|
||||
from utils.chore_expiry_notification_scheduler import start_chore_expiry_notification_scheduler
|
||||
from utils.digest_scheduler import start_digest_scheduler
|
||||
from utils.state_expiry_scheduler import start_state_expiry_scheduler
|
||||
|
||||
@@ -142,6 +143,7 @@ start_background_threads()
|
||||
start_deletion_scheduler()
|
||||
start_digest_scheduler(app)
|
||||
start_state_expiry_scheduler(app)
|
||||
start_chore_expiry_notification_scheduler(app)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=False, host='0.0.0.0', port=5000, threaded=True)
|
||||
Reference in New Issue
Block a user