mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
more aggressive killing
This commit is contained in:
parent
70cc54c508
commit
dd276b99da
@ -4,16 +4,28 @@ import os
|
|||||||
import utils
|
import utils
|
||||||
import time
|
import time
|
||||||
|
|
||||||
def killprocs( signal="" ):
|
|
||||||
cwd = os.getcwd();
|
cwd = os.getcwd();
|
||||||
if cwd.find("buildscripts" ) > 0 :
|
if cwd.find("buildscripts" ) > 0 :
|
||||||
cwd = cwd.partition( "buildscripts" )[0]
|
cwd = cwd.partition( "buildscripts" )[0]
|
||||||
|
|
||||||
|
print( "cwd [" + cwd + "]" )
|
||||||
|
|
||||||
|
def shouldKill( c ):
|
||||||
|
if c.find( cwd ) >= 0:
|
||||||
|
return True
|
||||||
|
|
||||||
|
if c.find( "buildbot" ) >= 0 and c.find( "/mongo/" ) >= 0:
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
|
def killprocs( signal="" ):
|
||||||
|
|
||||||
killed = 0
|
killed = 0
|
||||||
|
|
||||||
for x in utils.getprocesslist():
|
for x in utils.getprocesslist():
|
||||||
x = x.lstrip()
|
x = x.lstrip()
|
||||||
if x.find( cwd ) < 0:
|
if not shouldKill( x ):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
pid = x.partition( " " )[0]
|
pid = x.partition( " " )[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user