We're Hiring!

script management - script IDs/names

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

script management - script IDs/names

Postby dsudar » Fri Jan 26, 2018 9:57 pm

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
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA

Re: script management - script IDs/names

Postby jmoore » Sat Jan 27, 2018 9:29 am

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
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: script management - script IDs/names

Postby dsudar » Sat Jan 27, 2018 10:39 pm

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
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA

Re: script management - script IDs/names

Postby dsudar » Thu Feb 08, 2018 6:59 pm

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
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 0 guests