-
Notifications
You must be signed in to change notification settings - Fork 522
Add a client InfluxDBClusterClient
to handle a cluster of InfluxDB servers
#148
Conversation
dfc1025
to
6ce631f
Compare
I'll try to figure out how to properly test the class. But before that I must fix my InfluxDB cluster where I seems to hit bugs. |
I have to agree/say that it's not necessarily easy to get that.. Doing it with mocks could be quite more easy to get working.. to be seen.. |
6ce631f
to
74439c4
Compare
Modified code pushed, tests and docs comming |
…rvers Signed-off-by: Can ZHANG <[email protected]>
f814fd7
to
8e45a8e
Compare
Signed-off-by: Can ZHANG <[email protected]>
Signed-off-by: Can ZHANG <[email protected]>
8e45a8e
to
91eb6d4
Compare
Seems the failure isn't caused by this patch set, how can I trigger a retest? |
You can't. I just did! |
I intend to review this soon, sorry for the delay! |
try: | ||
cluster.query('Fail') | ||
except InfluxDBServerError: | ||
pass |
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 could/should also "assert the whole try/except block" with :
with self.assertRaises(InfluxDBServerError) as ctx:
cluster.query('Fail')
?
EDIT: the as ctx
isn't required/necessary as you don't assert anything specifically on the exception instance itself.
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
Looks great, but my one issue with this is that I wonder how other clients will be able to use it. For example the DataFrameClient and the SeriesHelper. Would there be an acceptable way of including this in the InfluxDBClient? |
By setting ( |
Oh, I had overlooked! Makes sense! However, other clients may need other things in the init. Also, maybe we should use from_DSN? |
Seems current |
@cannium Sorry for the delay. It looks like this is ready to be merged! Can I proceed? :) |
Sure, go ahead |
Thank you for your contribution! |
No description provided.