heroku/heroku.py — Issue #4: Process types with 0 running instances cause KeyError
Author: bengl3rt
Created: 2012-02-26 00:30:22+00:00
State: open

Say I have a pretty standard procfile declaring a "web" and a "worker" process. The default state for my app is to have a single web dyno running, and no workers running, using heroku.py to file up workers on demand.

However, when 0 workers are running,

app.processes['worker'].scale(0)

causes KeyError. In other words the process map only contains information about currently running dynos regardless of the contents of the procfile, making it impossible to automate the transition from 0 to 1 workers.