From 2c1b70b1b94bbffdfd9d19f06bc303077825df11 Mon Sep 17 00:00:00 2001 From: Chris McCormick Date: Thu, 27 Jun 2019 14:41:22 +0800 Subject: [PATCH] Ignore removed workers in SCALING file. (#47) If a worker has been removed from the Procfile it may still have an entry in the SCALING file on the server which causes a traceback when the removed worker is attempted to be spawned. With this patch piku ignores SCALING file entries which do not have a corresponding worker defined in Procfile. --- piku.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piku.py b/piku.py index 5174601..d2ee5d4 100755 --- a/piku.py +++ b/piku.py @@ -629,7 +629,7 @@ def spawn_app(app, deltas={}): # Configured worker count if exists(scaling): - worker_count.update({k: int(v) for k,v in parse_procfile(scaling).items()}) + worker_count.update({k: int(v) for k,v in parse_procfile(scaling).items() if k in workers}) to_create = {} to_destroy = {}