shawn-sterling/graphios — pull request #29 by djosephsen (2014-09-07 03:45:02+00:00)
Title: reRE-factored backends code

Here ya go!

I played with a few different implementations, and this was the winner. With this commit, the new graphios is fully functional on my test box as far as I can tell, though it wouldn't surprise me if we found some bugs yet. I put some verbose comments in there that you can remove once you've read them. A few are re: the new back-end design which I think is pretty good. Others refer to some code I put in to deal with graphios leaking empty files, because we're using a processed-line counter in process_spool_dir that ensures empty files never get sent to the handler (as far as I can tell). Also I was too lazy to read up on the appropriate way to safetly read and set defaults from configparser, so there are big try: blocks in backends.py which may or may not be necessary. Other than that I think we're pretty clean.