Task #8910 (closed)
Bug: Cmd call back
Reported by: | jburel | Owned by: | jamoore |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-4.4 |
Component: | Services | Version: | n.a. |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
The onfinished(Response) method is not invoked. It is not possible to notify users that the move has completed.
Change History (5)
comment:1 Changed 12 years ago by jmoore
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 12 years ago by jburel
For DeleteCallbackI, I am able to override the finished(int) method to notify the users. This is not possible for the CmdCallback. Modifying the delete call back is fine, but the ability to override the finish method is key.
comment:3 Changed 12 years ago by jburel
TODO:
- Override the onFinished method
- Review usage of DeleteCallBack and ScriptCallBack
comment:4 Changed 12 years ago by jmoore
Please try not to use the poll method. It's really for worst case scenarios (think: user vehemently clicking on a "refresh" button.) See the onFinished(Response, Status, Current) method instead.
comment:5 Changed 12 years ago by jmoore <josh@…>
(In [a527208db1504e522304b98387d767f2dbb92ff7/ome.git] on branch develop) Refactor and improve CmdCallbackI/HandleI (See #8910)
Though I couldn't reproduce onFinished() not being called,
as I started to write CmdCallbackTest? I realized there was
a good deal of improvement that could be made. This commit
includes:
- removal of CmdCallback?.cancelled in favor of .finished()
- pass status as well as response on finished
- only remote invocation should be via poll()
- state is accessible via getResponse/getStatus getters
- added isCancelled and isFinished helpers
Server-side there were a number of changes as well:
- addition of Timing command for testing callback speed
- 0-steps always causes a cancellation and an ERR response
- movement of all logging to Helper for better log parsing
- logging of Auth: information
- consistent setting of CANCELLED state
Pushed fix to sprint16-bugfixes:
However, I can't say that I ever saw finished/onFinished not be called, Jean-Marie. Give this a try and let me know. Perhaps you could extend one of the tests if it's not working. It may make sense for us to add a script and a delete cmd so we can refactor the ProcessCallback code in insight to simplify some of the logic.