Skip to content

Conversation

@Nahian12
Copy link

Addressed Issue:

Addressed notification and social media subsystems, improving their efficiency and maintainability. Specifically, it resolves redundant code and enhances data handling processes.

What I Have Reengineered

Notification Dispatch System:

Refactored logic for sending SMS messages to responders, eliminating redundant loops.
Added improved exception handling for API requests to the dispatchnotices endpoint.

Social Media Announcement Generator:

Optimized payloads for Facebook and Twitter announcements.
Reduced redundancy in creating crisis-related information.

Simplified the WebSocket broadcasting code and reduced redundant code.

Grouped reusable logic into helper functions.

Reengineering Strategy or Approach Used

Removing Redundant Code:

Extracted repetitive data processing (e.g., crisis description, type, and assistance formatting) into helper functions, improving maintainability.

Error Handling:

Enhanced exception handling around API calls.

Performance Improvement:

Reduced redundant loops and database queries to improve the speed.

Impact of Changes

Performance Gains:

Streamlined processing and reduced redundant steps, enhancing the system's response time.

Improved Maintainability:

The refactored code is modular, easier to understand, and aligns better with Django’s design principles.

Enhanced User Experience:

Notifications and social media posts are now consistently formatted and generated more efficiently.

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