Page 1 of 1

script management - script IDs/names

PostPosted: Fri Jan 26, 2018 9:57 pm
by dsudar
Hi team,

I'm using OMERO.scripts extensively to do many tasks and I "omero script launch" those scripts from bash scripts (or other external workflow automation tools). When I upgrade OMERO to a new version I re-insert my OMERO.scripts back into the appropriate OMERO_HOME/lib/scripts/omero/ folder but they will then have a different ID from before. So I keep needing to update my bash scripts with the new script IDs. Is there a way to "fix" the script IDs from version to version?

Or alternatively, can scripts be launched by name instead of ID? I guess I can do a lookup from the "omero script list" result but that sounds a little hokey.

Thanks,
- Damir

Re: script management - script IDs/names

PostPosted: Sat Jan 27, 2018 9:29 am
by jmoore
dsudar wrote:Hi team,


Hi Damir,

When I upgrade OMERO to a new version I re-insert my OMERO.scripts back into the appropriate OMERO_HOME/lib/scripts/omero/ folder but they will then have a different ID from before.


Do you do this before or after server startup? Assuming the checksums for the files haven't changed, I'd expect the IDs to stay the same. If not, this is worth our looking into.

So I keep needing to update my bash scripts with the new script IDs. Is there a way to "fix" the script IDs from version to version? Or alternatively, can scripts be launched by name instead of ID? I guess I can do a lookup from the "omero script list" result but that sounds a little hokey.


Sure. Use the path to the script in your launch command: bin/omero script launch /your/Script_Here.py

Regards,
~Josh

Re: script management - script IDs/names

PostPosted: Sat Jan 27, 2018 10:39 pm
by dsudar
Hi Josh,

Do you do this before or after server startup? Assuming the checksums for the files haven't changed, I'd expect the IDs to stay the same. If not, this is worth our looking into.


Ah yes, I typically re-upload the scripts after starting the server. Next time, I'll copy them directly into the directory before the start. Will let you know how that goes.

Sure. Use the path to the script in your launch command: bin/omero script launch /your/Script_Here.py


So that would even work for scripts that have not been "registered" with OMERO? Good to know. Thanks.

Cheers,
- Damir

Re: script management - script IDs/names

PostPosted: Thu Feb 08, 2018 6:59 pm
by dsudar
Just a quick note to confirm that script IDs indeed stay the same over a server upgrade IFF you don't start the server before moving the scripts into their appropriate location. So that's now part of my server upgrade protocol.
Thanks,
- Damir