openmicroscopy/openmicroscopy — pull request #2769 by joshmoore (2014-07-08 08:42:45+00:00)
Title: Auto close

To round out the options (e.g. `--wait_completed`, `--close_completed`, etc) from `import --advanced-help`, `--auto-close` has now been added which calls close on the `ImportProcessPrx` and the `HandlePrx` as soon as possible. This branch was initially intended for 5.1 for which additions were made to the API (`ImportSettings.autoClose`). Since that's not feasible for 5.0.3, this uses a user-annotation with the `NSAUTOCLOSE`namespace. (Later DB upgrades can look for failed auto-closed entries)

To test:
* `bin/omero import -- --auto_close FILES`
* Should show "Disconnecting" once upload is finished.
* In `Blitz-0.log` a statement such as this should be printed:
```
2014-07-08 09:57:51,692 INFO [ o.s.blitz.repo.ManagedImportRequestI] (2-thread-2) Auto-closing...
```
* For the keen, import 1000s of images and see if `lsof` is happy.

/cc @bpindelski @ximenesuk @sbesson @mtbc