Skip to content

Conversation

@mallikarjun-b-r
Copy link

No description provided.

Copy link
Contributor

@sivachandran sivachandran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added comments only for ServiceRequestRepository. But if you agree with the comment then you can other repositories as well.

@@ -0,0 +1,35 @@
package repository
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can name the file as just service_request.go. the word repository is already part of the package name.

"github.com/prometheus/common/log"
)

type servicerequestrepositorypostgres struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can move postgres specific implementation to under postgres subpackage and name the struct as ServiceRequestRepository. So, in the above init function we will have serviceRequestRepository = postgres.ServiceRequestRepository

for stepResponse := range resumeStepsChannel {
prefix = fmt.Sprintf("%s [REQUEST_ID: %s]", prefix, stepResponse.ServiceRequestID)
log.Debugf("%s : Received step response : %v", prefix, stepResponse)
log.Infof("%s : Received step response : %v", prefix, stepResponse)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logs in hot code path decreases the RPS. You can revert the change if there are no other specific reason.

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