Re: stopping a runaway project

"Lucas Albers" <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
So the fix is to make sure everything in your project has a timeout.
I found just having a timeout on the version control checkout solves most
stall problems.


<target name="cvs_update-try">
    <echo>updating localcopy copy from cvs timeout set to:1500
seconds</echo>
    <antelope:try>
      <antelope:limit maxwait="1500" failonerror="true">
        <cvs command="up -d -C -P"/>
      </antelope:limit>
      <antelope:catch>
        <echo message="falling back to a complete new checkout:stub"></echo>
      </antelope:catch>
      <antelope:finally>
        <!-- rollback files -->
      </antelope:finally>
    </antelope:try>
  </target>

-----Original Message-----
From: Lucas Albers [mailto:[email protected]] 
Sent: Thursday, April 09, 2009 7:06 PM
To: [email protected]
Subject: [Cruisecontrol-user] stopping a runaway project

Is there a method to kill a project that won't stop; without restarting cc?

http://confluence.public.thoughtworks.org/display/CC/RunningCruiseControlFro
mUnixInit

I find this reference for a jmx reference; but cannot find a jmx interface
to whack a runaway project on the side of its head.

...get back in your cell project...back to work...whack.

#!/bin/sh

JMXURL="http://localhost:8000"

if [ -z "$1" ]; then
        echo "ERROR: You have to pass a project name as argument"
        echo "Usage: $0 <project> [<targets>...]"
        exit 1
else
        project="$1"
        shift
fi

# Checkout projects:
if [ "$1" ]; then
        targets=`echo $@ | sed -e 's/ /+/g'`
 
params="operation=buildWithTarget&value0=$targets&type0=java.lang.String"
else
        params="operation=build"
fi

stat=`curl -s
"$JMXURL/invoke?objectname=CruiseControl+Project:name=$project&$params&templ
ate=identity" | perl -pe 's/>/>\n/g' \
   | grep '<Operation ' | cut -d '"' -f 6`

# above was one line, broken to fit better on the wiki
# if it doesn't work as written, reappend the line starting with a pipe "|"
to the one above. -quig

echo "Invokation: $stat"


----------------------------------------------------------------------------
--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Cruisecontrol-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.