You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.