Conversation
|
DeputyDev has started reviewing your pull request. |
|
DeputyDev has completed a review of your pull request for commit 8c4c311. |
app/constants/email.py
Outdated
|
|
||
|
|
||
| class MailSenderConstant(Enum): | ||
| SparkPost = "spark_post" |
There was a problem hiding this comment.
SPARK_POST
Please follow 1 convention throughout
There was a problem hiding this comment.
this was in small case previously also
Pipfile
Outdated
| torpedo = {editable = true, ref = "1.0.0", git = "https://github.com/tata1mg/torpedo"} | ||
| commonutils = {editable = true, ref = "1.0.0", git = "https://github.com/tata1mg/commonutils"} | ||
| torpedo = {editable = true, ref = "4.2.0", git = "ssh://git@bitbucket.org/tata1mg/torpedo.git"} | ||
| commonutils = {editable = true, ref = "1.8.7", git = "ssh://git@bitbucket.org/tata1mg/commonutils.git"} |
There was a problem hiding this comment.
Aren't these private ? How will these work for open source repo?
There was a problem hiding this comment.
They were getting used before also, as in the existing version of notifyone.
There was a problem hiding this comment.
updating this to public repo links
| Host._listeners = listeners | ||
| torpedo.run() | ||
|
|
||
| # register combined blueprint group here. |
There was a problem hiding this comment.
@prshant70 can you verify this, not sure if this wasn't working earlier,
There was a problem hiding this comment.
This change is due to update in Torpedo version.
| @staticmethod | ||
| def map_sms_status(event_status: SmsEventStatus) -> ExecutionDetailsEventStatus: | ||
| status_map = { | ||
| SmsEventStatus.SENT: ExecutionDetailsEventStatus.SUCCESS, |
There was a problem hiding this comment.
How are these statuses being mapped prior to our change?
| from torpedo import CONFIG, BaseApiRequest | ||
| from torpedo.constants import HTTPMethod | ||
|
|
||
| from app.constants import Channels |
| error={ | ||
| "error": f"Encountered error while sending push noitifcation {str(err)}" | ||
| }, | ||
| meta=str(err), |
| } | ||
|
|
||
| files = template_data.get("files") or list() | ||
| attachment_data = template_data.get("attachment_data") |
DeputyDev generated PR summary:
Size L: This PR changes include 183 lines and should take approximately 1-3 hours to review
The PR titled "Sms handler updates" introduces the following changes:
New Python Module: A new file
execution_details.pyis added. It provides classes and methods to map SMS event statuses to internal execution statuses, such asQUEUED,PENDING,SUCCESS, andFAILED, based on the status constants defined inSmsEventStatus.Updated Logging: The logging system in
sqs.pyand within SMS handlers uses newly mapped execution statuses. This ensures a more consistent and meaningful logging of SMS handling results.Constants for SMS Events: Added
sms.pyto define various SMS event statuses likeSENT,DELIVERED,FAILED, etc., as an Enum, which can now be easily used across different modules.Handlers Improvements: In various handler modules (e.g.,
plivo_manager.py,sms_country_manager.py), the SMS send operation and callback handling logic now utilizesExecutionDetailsto determine the status of operations more consistently.Configuration Template Enhancements: Added SMS gateway configuration details to
config_template.json, laying out settings for gateways such asaws_sns,plivo, andsms_country.Overall, this PR effectively streamlines status mapping and logging functions for SMS operations across the application.
DeputyDev generated PR summary until 8c4c311