Permalink
Browse files

Merge pull request #18 from 198d/brute_force_teardown

CI

Update spec/bin/ci to do a little brute force process gardening at the
end of the teardown if this script is running in an environment under
the jenkins user.
  • Loading branch information...
2 parents 5b7344d + 2e23995 commit 5e5892d69d3dc076137741bca87e2f7f48b96112 @198d 198d committed Mar 23, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/bin/ci
View
9 spec/bin/ci
@@ -59,6 +59,14 @@ function teardown {
if [ -n "$DAEMONSPID" ]; then
kill -INT $DAEMONSPID
fi
+
+ # celeryd doesn't always shutdown cleanly when running in Jenkins; give
+ # it a second before nuking everything left behind. This assumes the job
+ # is called rcelery.
+ if [ -n "$JENKINS_URL" ]; then
+ sleep 1
+ kill -9 `ps -ef | grep 'rcelery.*celeryd' | grep -v grep | awk '{print $2}'`
+ fi
}
function break_on_fail {
@@ -138,4 +146,5 @@ setup
run_integrations
fi
teardown
+exit 0

0 comments on commit 5e5892d

Please sign in to comment.