Task #2177 (new)
Opened 14 years ago
Last modified 10 years ago
Add callback methods to omero.scripts.client — at Initial Version
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-Beta4.2 |
Component: | Scripting | Version: | n.a. |
Keywords: | n.a. | Cc: | jburel, wmoore, crueden-x |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.5d |
Sprint: | 2010-04-02 (6) |
Description
After discussions (Apr 12), scripts should have a mechanism for requesting more information from the user and informing the user about the current status of the script ("0.5% finished", etc.)
This will require work on the notification system (#2169)
Proposal:
mainJobParams = omero.grid.JobParams() mainJobParams.name = "imageProjection" # Name of script mainJobParams.inputs = {"image" : omero.grid.Param(...)} secondaryJobParams = omero.grid.JobParams() secondaryJobParams.name = "z" # Name of step secondaryJobParams.input = {"z" : omero.grid.Param(...)} # Define a script which takes an image c = omero.scripts.client("name",\ mainJobParams, callbacks = [ secondaryJobParams ]) values = c.callback(index=0, timeout = 5) # or values = c.callback(name="z", timeout = 5) c.progress(percent = 0.5, step = "Downloading", index = 5, total = 100) c.exception(exception = ex) # Possible future additions: c.checkpoint() # saves all the session items
Suggestions welcome
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.