Is it possible to put in a timeout for the scripts that will be executed if you add a "Custom pre-hook" under "Pre Hooks"?
Because i just tested it with a simple while(true) and it has been running for about 10minutes now. I would very much like to prevent this.
Hi @wlfbck ,
Thank you for your post.
Currently you have two options with ScriptRunner for Bitbucket.
In your Scripts you could add an @TimedInterrupt annotation, as documented here: https://docs.groovy-lang.org/2.5.14/html/gapi/groovy/transform/TimedInterrupt.html
This should add a timeout to the Scripts that is added too.
If however you find yourself with a Script that appears to be running forever, currently, you would need to restart your Bitbucket instance.
This is something we are looking to improve with the product.
I hope this helps answer your question?
Kind regards,
Robert Giddings,
Product Manager, ScriptRunner for Bitbucket
TimedInterrupt should work, i will try that out. Thank you for the suggestion!
But from an administrators perspective i think it would be great if runtime could be limited via a general Scriptrunner setting, since something like this could happen without any intention and then just as easy go unnoticed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.