Task #2177 (new)
Opened 14 years ago
Last modified 10 years ago
Add callback methods to omero.scripts.client — at Version 6
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | critical | Milestone: | Unscheduled |
Component: | Scripting | Version: | 5.0.2 |
Keywords: | n.a. | Cc: | jburel, wmoore, crueden-x |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.5d |
Sprint: | n.a. |
Description (last modified by jamoore)
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
See:
- https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=7544 - user using Job.message for status.
Change History (6)
comment:1 Changed 14 years ago by wmoore
comment:2 Changed 14 years ago by jmoore
- Milestone changed from OMERO-Beta4.2 to Unscheduled
- Sprint 2010-04-02 (6) deleted
comment:3 Changed 11 years ago by spli
- Cc crueden-x added; dzmacdonald removed
Out of the tickets in story #1341 this is potentially the most useful for long running scripts, which is what we've settled on for doing feature calculation (at least in the short term). Progress information is almost essential, callbacks for client feedback/choices would make the scripting UI a lot nicer.
CC: Curtis, might be useful for ImageJ work.
comment:4 Changed 11 years ago by jmoore
This needs to be compared with the new(ish) omero.cmd.Handle interface: https://github.com/openmicroscopy/openmicroscopy/blob/v.4.4.6/components/blitz/resources/omero/cmd/API.ice#L89
That may mean that a script need only do (conceptually) getCallback().step(0,10) if a callback has been set.
comment:5 Changed 10 years ago by jamoore
Referencing ticket #1341 has changed sprint.
comment:6 Changed 10 years ago by jamoore
- Description modified (diff)
- Version set to 5.0.2
Just saving these ideas from discussion...