NPO/codem-transcode — pull request #4 by unRob (2011-10-19 08:48:35+00:00)
Title: Queue and threads support

I made a bunch of changes to accommodate the hardware I'll be deploying codem in.

Changes:
* Automatic queue support: if all slots are occupied, it'll push them to the queue; once a job ends, it'll start the next one and so on.
* Slots are measured as total threads, so the `-threads` option in `encoder_options` specifies how many a job will fill; defaults to 1 thread and will not allow for more ffmpeg-threads/slots than cpu threads available.
* Progress measured in a 0-100 scale

Nitpicks:
* Made as JSLint compliant as possible
* Indented with tabs instead of spaces (sorry, I guess?)

If you find these changes suitable, let me know. I'll continue to contribute to my fork once I see how it works in my testing server. I plan to add a MongoDB driver once I push this to production and might figure out a way to set priority for queued jobs.

Great job, btw!