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 #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

Change History (0)

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.71207 sec.)

We're Hiring!