-
Notifications
You must be signed in to change notification settings - Fork 17
Remove Providers from Redis Queues When IsAvailable is Set to False #443
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
base: main
Are you sure you want to change the base?
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.
looks good to me
only remove uncessary log
utils/utils.go
Outdated
continue | ||
} | ||
|
||
logger.Infof("Successfully removed provider %s from Redis queue %s", provider.ID, redisKey) |
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.
remove log
I am approving this with the suggestion that |
@sundayonah conflict please |
…d priority queue services - Updated error logging in to ensure consistent formatting and improved contextual information for various failure scenarios. - Enhanced error messages to include relevant details such as token addresses, order IDs, and provider IDs for better traceability. - Refactored logging in to align with the new formatting standards, ensuring clarity in error reporting. - Improved error handling in by adding more descriptive logging for RPC client connections and order operations.
…requirement for provider tokens
…n error instead of returning
…roviderController - Updated the Stats method to separately aggregate USD and local stablecoin volumes. - Enhanced error handling to log errors and return appropriate API responses when fetching provider stats fails. - Adjusted total fiat volume calculation to account for different token currencies. - Combined USD and local stablecoin volumes for the final response.
…urate volume aggregation
…prove stats calculations
…improve total fiat volume calculation
…clarity - Enhanced the profile test to include additional token properties and commented out a test case for future restoration. - Simplified error messages in the UpdateSenderProfile method for better readability. - Replaced utility function calls with direct references to improve code clarity.
…nality for future testing
…s migration files
* Add JSON schema for smile ID types configuration This commit introduces a new JSON schema file that defines the structure for smile ID types, including continents, countries, and their respective ID types. The schema enforces validation rules such as required fields, string patterns for country codes, and minimum item requirements for arrays. * feat: add JSON schema for smile ID types configuration This commit introduces a new JSON schema file that defines the structure for smile ID types, including continents, countries, and their respective ID types. The schema enforces validation rules such as required fields, string patterns for country codes, and minimum item requirements for arrays. * test: add test to smileID implementation * chore: rename 'document_image' to 'doc_verification' in smile_id_types.json * chore: fix conflicts * fix: close LoadSmileIDConfig function and clean up IsValidHttpsUrl * feat: initialize aggregator with base structure * feat: load SmileID configuration dynamically and refactor ID types generation * fix: update country name reference to use country code in ID types generation * refactor: improve SmileID configuration loading and flattening logic * fix: reorganize Smile ID files according to new structure * fix: implement robust file path resolution for Smile ID configuration * fix: remove Kosovo (XK) and its ID types from countries verification configuration * refactor(kyc): update identity verification request handling and signature verification - Replaced the deprecated with across the codebase. - Implemented a new method for Ethereum signature validation. - Enhanced error handling in the identity verification process by introducing specific error types for better clarity. - Removed the file as its functionality has been integrated into the new structure. --------- Co-authored-by: Prosper <[email protected]> Co-authored-by: Chibuotu Amadi <[email protected]>
- Changed the environment configuration to use SERVER_URL instead of HOST_DOMAIN. - Updated the KYC verification request structure to use types from the new shared types package. - Removed the old KYC types and configuration files, streamlining the KYC service implementation. - Adjusted tests to reflect the new structure and ensure compatibility with the updated KYC provider interface.
* feat: add metadata field to payment order and recipient models - Introduced a new field in the and entities to store additional information. - Updated related functions and methods to handle the new field, including setting, clearing, and querying its values. - Refactored the server configuration to replace with for consistency. - Adjusted various services and tests to accommodate the new metadata functionality. * refactor: remove invalid signature format test from SmileID service - Eliminated the test case for invalid signature format in the SmileID service tests to streamline the test suite. - This change helps focus on relevant test scenarios and improves overall test clarity. * feat: add metadata field to LinkedAddress entity and related functionality
* feat(ci): add Atlas database migrations workflow - Add GitHub Actions workflow for automated database migrations - Configure environment-specific database URLs for staging and production - Run migrations on push to main and stable branches * refactor(ci): remove pull request trigger from Atlas migration workflow
Description
This PR implements a feature to immediately remove providers from Redis queues when their IsAvailable status is set to false during a profile update, ensuring the system does not route orders to unavailable providers. The change addresses a user story requirement by modifying the UpdateProviderProfile function and introducing a new utility function, RemoveProviderFromQueues, in the utils package.
Purpose and Background
Implementation Details
Check for IsAvailable Change: In UpdateProviderProfile, added logic to detect when IsAvailable transitions from true to false using isAvailableChangingToFalse
References
Closes #435
Testing
Checklist
main
By submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.