Skip to content
This repository has been archived by the owner on Mar 8, 2018. It is now read-only.

Commit

Permalink
Cleanup some superfluous whitespace
Browse files Browse the repository at this point in the history
Change-Id: I27a0513f5f901650293d6d2bb1dd3b9761f8a743
  • Loading branch information
R. Tyler Croy committed Mar 3, 2011
1 parent 4230fb5 commit 9e1221d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/spawning/spawning_controller.py
Expand Up @@ -84,7 +84,7 @@ def environ():

env['PYTHONPATH'] = ':'.join(new_path)
return env

class Child(object):
def __init__(self, pid, kill_pipe):
self.pid = pid
Expand Down Expand Up @@ -147,14 +147,14 @@ def spawn_children(self, number=1):
if not tpool_size in (0, 1):
env['EVENTLET_THREADPOOL_SIZE'] = str(tpool_size)
os.execve(sys.executable, command, env)

# controller process
os.close(child_side)
self.children[child_pid] = Child(child_pid, parent_side)

def children_count(self):
return len(self.children)

def runloop(self):
while self.keep_going:
eventlet.sleep(0.1)
Expand Down Expand Up @@ -228,12 +228,12 @@ def run(self):

signal.signal(signal.SIGHUP, self.handle_sighup)
signal.signal(signal.SIGUSR1, self.handle_deadlychild)

if self.config.get('status_port'):
from spawning.util import status
eventlet.spawn(status.Server, self,
eventlet.spawn(status.Server, self,
self.config['status_host'], self.config['status_port'])

try:
self.runloop()
except KeyboardInterrupt:
Expand Down Expand Up @@ -474,11 +474,11 @@ def main():
# If you tell me to watch something, I'm going to reload then
if options.watch:
options.reload = True

if options.status_port == options.port:
options.status_port = None
sys.stderr.write('**> Status port cannot be the same as the service port, disabling status.\n')


factory_args = {
'verbose': options.verbose,
Expand Down

0 comments on commit 9e1221d

Please sign in to comment.