Skip to content
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

Split Repository Based On Entities #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

@@ -42,7 +42,7 @@ func resumeSteps(workerID int, resumeStepsChannel <-chan models.AsyncStepRespons
log.Infof("%s : Started listening to resume steps channel", prefix)
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.

None yet

2 participants