-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: master
Are you sure you want to change the base?
Split Repository Based On Entities #104
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.
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 |
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.
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 { |
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.
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) |
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.
Logs in hot code path decreases the RPS. You can revert the change if there are no other specific reason.
No description provided.