SmartCircuits new API#36
Conversation
|
Thankyou! I will try to have a look and test it today. I am pretty sus of 6cba9da, and might rebase around it. I totally see what you're driving at with it, but the fact that the cache never purges, as well as the fact that it makes reasoning about what the integration actually sees makes me pretty skeptical. As a concrete example, it seems that sometimes they just return an empty body and if that winds up in the cache I think the whole integration will wedge itself. |
916bde9 to
4c9fe99
Compare
|
Oh thankyou! I was happy to go around it, but appreciate you rebasing :) |
this is intended only for periodic calls and the cache purges every time its API is invoked, for any client including dead and gone. i can tell you from experience it makes a big difference in HTTP traffic, especially with async. |
what is "sus"??? |
4c9fe99 to
efdbfcf
Compare
|
fixed statistics |
f49551d to
4f73421
Compare
|
bump |
| case 3: | ||
| self.circuits = [None, *circuits] | ||
| case 4: | ||
| self.circuits = [None, *circuits[1:]] |
There was a problem hiding this comment.
Can you elaborate on what the usecase for this is?
There was a problem hiding this comment.
to avoid off-by-one bugs circuits[0] is always None. the constructor accepts 3 or 4 length list, usually from a generator (length=3), but could be a copy operation (length=4). this code enforces the restriction.
There was a problem hiding this comment.
I see. To me this just really increases the chances of off by one bugs? As a casual reader I would never really expect there to be a phantom 0th element that I need to understand or care about. I think if you are really worried about this class of problem you probably want to just make the list private and make some accessors that always do the right thing? It's not like there can be arbitrarily many of them
There was a problem hiding this comment.
changed to explicit dict. note 2 is not present if circuits 1 & 2 are merged.
4f73421 to
e6f795b
Compare
fixes #35