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 #2404 (closed)

Opened 9 years ago

Closed 9 years ago

Scripts should closeSession()

Reported by: wmoore Owned by: wmoore
Priority: minor Milestone: OMERO-Beta4.2
Component: General Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2010-05-27 (10)

Description (last modified by wmoore)

Josh on dev-team

closeOnDestroy and detachOnDestroy should really only be used if you know you need them.

otherwise, one should always call closeSession()

in fact, our "script type" should probably include:

client = scripts.client()
try:
...
finally:
client.closeSession()

it would definitely be best to close the stateful services you create.

So, should probably keep track of gateway, renderingEngine etc. and make sure to call close() on them.

Change History (5)

comment:1 Changed 9 years ago by wmoore

  • Description modified (diff)

comment:2 Changed 9 years ago by wmoore

  • Status changed from new to assigned

comment:3 Changed 9 years ago by wmoore

(In [7052]) Added try / finally: client.closeSession to all scripts. See #2404.

comment:4 Changed 9 years ago by cxallan

  • Sprint changed from 2010-05-13 (9) to 2010-05-27 (10)

comment:5 Changed 9 years ago by wmoore

  • Remaining Time set to 0
  • Resolution set to fixed
  • Status changed from assigned to closed

(In [7124]) call closeSession at end of each script. Closes #2404.

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

We're Hiring!