ryanhiebert / hirefire

A Python lib to integrate with the HireFire service -- The Heroku Proccess Manager.
https://hirefire.readthedocs.io/
Other
34 stars 21 forks source link

Dump refactor #22

Closed ryanhiebert closed 7 years ago

ryanhiebert commented 7 years ago

First, make the fallback quantity 0, which is what is advised by HireFire. That the string 'null' even works is a fluke of implementation, and 0 is the right default to have.

Then, split up the JSON encoding from the payload generation. This makes it possible to interface with with a defined function to get the data that HireFire collects, without having to un-encode it to use it in Python.

ryanhiebert commented 7 years ago

I'll note that the new function being introduced here is an internal one, not an external interface. Thus, I won't find the need to keep it for backward compatibility if it proves a hassle in the future. Still, for people willing to live with that possibility (like myself), it's nicer to have it separated from the json encoding so that I can use it directly.