-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request implements comprehensive health monitoring and webhook notification functionality for the Subscription Tracker application. It focuses on improving system reliability through Docker health checks and adding a robust webhook system for subscription notifications.
- Docker health checks for application and database containers with appropriate timeouts and retry configurations
- Complete webhook notification system supporting multiple platforms (Discord, Slack, Teams, Gotify, Generic)
- Enhanced form validation for webhook URLs with type-specific validation rules
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docker-compose.yml | Adds health check configurations for web, postgres, and mariadb services |
| app/webhooks.py | New comprehensive webhook system with multiple platform support and notification functionality |
| app/forms.py | Enhances webhook URL validation using the new webhooks module |
| TIMEOUT_FIX.md | Removes obsolete timeout fix documentation |
| Dockerfile | Adds curl dependency and health check configuration for the web container |
| DATABASE_SETUP.md | New comprehensive database and health monitoring documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| response.raise_for_status() | ||
|
|
||
| # Update last_used timestamp | ||
| self.webhook.last_used = datetime.utcnow() |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using datetime.utcnow() is deprecated in Python 3.12+. Consider using datetime.now(timezone.utc) for timezone-aware UTC timestamps.
|
|
||
| embed = { | ||
| "description": message, | ||
| "timestamp": datetime.utcnow().isoformat(), |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using datetime.utcnow() is deprecated in Python 3.12+. Consider using datetime.now(timezone.utc) for timezone-aware UTC timestamps.
| def prepare_payload(self, message: str, title: str = None, color: str = None) -> Dict[str, Any]: | ||
| payload = { | ||
| "text": message, | ||
| "timestamp": datetime.utcnow().isoformat() |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using datetime.utcnow() is deprecated in Python 3.12+. Consider using datetime.now(timezone.utc) for timezone-aware UTC timestamps.
|
|
||
| attachment = { | ||
| "text": message, | ||
| "ts": int(datetime.utcnow().timestamp()), |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using datetime.utcnow() is deprecated in Python 3.12+. Consider using datetime.now(timezone.utc) for timezone-aware UTC timestamps.
Fixes for healthcheck and webhooks