Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,576
Community Members
 
Community Events
176
Community Groups

Scriptrunner: Timeout for pre receive hooks?

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.

1 answer

1 accepted

1 vote
Answer accepted

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.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events