-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat(server): implement postgres queue driver #3030
Conversation
type loggerFn func(string, ...any) | ||
|
||
func newLoggerFn(name string) loggerFn { | ||
return func(format string, params ...any) { | ||
log.Printf("[%s] %s", name, fmt.Sprintf(format, params...)) | ||
} | ||
} |
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.
This is useful even outside of this package. Perhaps we could move it to a specific infra package in the future?
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.
yes, I found the pattern very useful, but if we want to improve our logging I would make it a bit more sophisticated
return | ||
} | ||
|
||
ctx, cancelCtx := context.WithTimeout(context.Background(), 500*time.Millisecond) |
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.
Can we add this 500ms
timeout as a constant? Something like enqueueTimeout
?
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.
done!
This PR implements a postgres queue driver
Changes
Checklist