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.
pull/51/head
Chris McCormick 2019-06-27 14:41:22 +08:00 zatwierdzone przez Rui Carmo
rodzic 02c9017db9
commit 2c1b70b1b9
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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 = {}