Skip to content

Conversation

@GitTimeraider
Copy link
Owner

Fixes for healthcheck and webhooks

Copilot AI review requested due to automatic review settings October 6, 2025 15:37
Copy link

Copilot AI left a 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()
Copy link

Copilot AI Oct 6, 2025

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.

Copilot uses AI. Check for mistakes.

embed = {
"description": message,
"timestamp": datetime.utcnow().isoformat(),
Copy link

Copilot AI Oct 6, 2025

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.

Copilot uses AI. Check for mistakes.
def prepare_payload(self, message: str, title: str = None, color: str = None) -> Dict[str, Any]:
payload = {
"text": message,
"timestamp": datetime.utcnow().isoformat()
Copy link

Copilot AI Oct 6, 2025

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.

Copilot uses AI. Check for mistakes.

attachment = {
"text": message,
"ts": int(datetime.utcnow().timestamp()),
Copy link

Copilot AI Oct 6, 2025

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.

Copilot uses AI. Check for mistakes.
@GitTimeraider GitTimeraider merged commit 8590fb6 into main Oct 6, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants