-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: CI, integration tests, cleanup #8
Conversation
9f9ad47
to
8f3d108
Compare
df6b97b
to
460acc5
Compare
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.
Will have another look later. Looks really good.
jinahub/indexers/query/keyvalue/PostgreSQLQueryIndexer/README.md
Outdated
Show resolved
Hide resolved
2c6f4b7
to
8cfb89a
Compare
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.
Some remarks.
password=self.password, | ||
database=self.database, | ||
table=self.table) | ||
|
||
def get_handler(self) -> 'PostgreSQLDBMSHandler': |
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.
These get_XXX_handler
functions are a smell to me. Just use self.handler
.
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 think those were necessary because of the BaseIndexer's close call, which would call these. Removed
@@ -58,22 +69,12 @@ def size(self): | |||
.. # noqa: DAR201 | |||
""" | |||
with self.handler as postgres_handler: |
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 am not convinced of opening/closing connection with every operation. This creates quite some overhead, especially when the database is running on a distance machine. Why not open the connection once and keep it open?
jinahub/indexers/query/compound/NumpyPostgresQueryIndexer/requirements.txt
Outdated
Show resolved
Hide resolved
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.
LGTM
Part of jina-ai/serve#2560 and jina-ai/serve#2479