-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
core/services/ocr2/plugins/ocr2keeper/evmregister/v21/upkeepstate: use sqlutil instead of pg.QOpts #12806
Conversation
I see you updated files related to
|
f47ba21
to
cdcb4b1
Compare
…e sqlutil instead of pg.QOpts
cdcb4b1
to
f18cdc7
Compare
Quality Gate passedIssues Measures |
@@ -320,7 +320,9 @@ func (u *upkeepStateStore) cleanup(ctx context.Context) error { | |||
func (u *upkeepStateStore) cleanDB(ctx context.Context) error { | |||
tm := time.Now().Add(-1 * u.retention) | |||
|
|||
return u.orm.DeleteExpired(tm, pg.WithParentCtx(ctx), pg.WithLongQueryTimeout()) | |||
ctx, cancel := context.WithTimeout(sqlutil.WithoutDefaultTimeout(ctx), time.Minute) |
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.
Is it ok to remove the timeout completely?
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.
How come? I think these are still necessary to replace the default timeout which may be too short.
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.
Just wondering if it's ok to never timeout, compared to what we have now. I don't have a strong preference, just noticed the difference.
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 change is preserving the original "long" timeout of 1m
.
https://smartcontract-it.atlassian.net/browse/BCF-2978