-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add option to create new ThumbnailStore connection #129
base: master
Are you sure you want to change the base?
Conversation
In general 👍 for the added functionality. The only thing that it would be good to consider is if there is any unification needed in terms of the API if we foresee ourselves adding something similar to other methods. cc: @will-moore A few ideas:
but probably could use some discussion before any more commits, @dominikl. |
src/omero/gateway/__init__.py
Outdated
@@ -8395,7 +8401,7 @@ def _getProjectedThumbnail(self, size, pos): | |||
|
|||
# @setsessiongroup | |||
def getThumbnail(self, size=(64, 64), z=None, t=None, direct=True, | |||
rdefId=None): | |||
rdefId=None, use_cached_ts=True): |
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 don't need this if the default use_cached_ts
is True.
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.
Not quite sure. So only def getThumbnail(self, size=(64, 64), z=None, t=None, direct=True, rdefId=None, use_cached_ts)
then check with if not use_cached_ts
?
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.
It wouldn't surprise me that the same argument would need to be present on multiple methods for a value to be propagated through a call stack (if it's not stateful).
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.
With the last commit you can set |
Functionality seems to work as expected. 👍 The only issue that I note is that when using the mutator ( |
Would it be useful to keep track of these ProxyObjectWrappers and add another method like |
I'm not sure. As long as the docs are clear on who's responsible in each case. For example, I'm pretty sure we've hunted down the various "leaks" caused by not calling close on the cached services. It'd be a shame to introduce something similar. Ultimately, who owns the pointers? |
--exclude |
I ran into the need to NOT reuse rawPixelStore recently when multiple threads try to load pixel data simultaneously from napari - see https://forum.image.sc/t/napari-lazy-loading-from-omero/32292 |
Happy to discuss. Technically a new method should mean this is a minor bump, so 5.6.0 is a good target. Would having |
Just adds an option to
_prepareTB
to use a new ThumbnailStore connection. If the cached one of the BlitzGateway is used then you can't callgetThumbnail
for multiple images in parallel.Required by ome/omero-cli-render#33