Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #8910 (closed)

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

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

Pushed fix to sprint16-bugfixes:

commit a527208db1504e522304b98387d767f2dbb92ff7
Author: jmoore <josh@glencoesoftware.com>
Date:   Fri May 25 23:27:30 2012 +0200

    Refactor and improve CmdCallbackI/HandleI (See #8910)
...

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.

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
Last edited 12 years ago by jburel (previous) (diff)

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
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.71361 sec.)

We're Hiring!