seomoz/qless-core — pull request #20 by dlecocq (2013-06-17 21:01:32+00:00)
Title: New Unified Core Scripts

One of the difficulties of the arrangement before is that there was a lot of repeated code, and it was just generally quite ugly with the need to have one script per command.

This is a big first step in a new direction, in which we have modularized scripts that get concatenated into a single unified script for execution. Most scripts name essentially the functionality they describe (config, job, queue, etc.), but there are also `base.lua` (which contains some very core functionality and some helper methods) and `api.lua` (which defines the public-facing API).

There's a `Makefile` included now, that can produce the generated files (and strip comments) `qless-lib.lua` and `qless.lua`. The first, `qless-lib.lua` describes the inner workings and is _suitable for inclusion in other Redis lua scripts_, while `qless.lua` just the public API tacked onto the end of it.