ome/omero-metadata

populate --context delemap: fix default wait argument

Opened this issue · 0 comments

See https://forum.image.sc/t/omero-metadata-fails-on-deletemap-when-well-to-images-was-set-yes/27761 and #11 (comment)

The default wait value of the CLI command is set -1 but the logic for handling indefinite waiting is not implemented in the plugin:

wait = args.wait
if wait:
ms = 5000
loops = int((wait * 1000) / ms) + 1

This means the default populate --context deletemap command will fail immediately unless --wait is overriden.

Looking at the implementation in the base GraphControl, two options can be considered for the immediate fix:

  • change the default wait value to None and use some sensible default values for loops and ms
  • implement the wait=-1 use case i.e. wait for the deletion command to finish by default and allow it to be aborted via the CLI