Is There a Groovy Equivalent of the Ruby Timeout Module

Is there a Groovy equivalent of the Ruby Timeout module?

There is the TimedInterrupt annotation, but I've not tried it out yet...

Gave it a quick test, and this (poor example):

@groovy.transform.TimedInterrupt( 5L )
def loopy() {
int i = 0
try {
while( true ) {
i++
}
}
catch( e ) {
i
}
}

println loopy()

Runs in the groovy console and prints out i after 5 seconds.

I get:

47314150

Jenkin's build failing on npm install

There are several problems here.

It looks like you are using node 0.11. Why? Do you need a feature from that unstable branch?

If not, I would recommend using the nodesource packaged node modules, as described here: https://github.com/nodesource/distributions#usage-instructions

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs

This will get you a good installation of node and npm in the global path, visible to both your ubuntu user and the jenkins user.

Finally, /home/ubuntu/.npm/npm is not an executable, but is the cached version of the npm package; /home/ubuntu/.npm is the per-user npm download cache.



Related Topics



Leave a reply



Submit