   {dash} = require 'bongo'
 
   {extend} = require 'underscore'
+
   # @create = ()
 
   @setLimits = (limits) ->


          limitOptions = limits[limitName]

          limitOptions = { unit: limit }  if 'string' is typeof limitOptions

          limitOptions = extend { title: limitName }, defaultOptions, limitOptions

          limit = new JLimit limitOptions

        fin = queue.fin.bind queue

        return

  debit: (debits, callback=(->)) ->
    @fetchLimits (err, limits) ->
      return callback err  if err

      queue = limits.map (limit) -> ->
        {title} = limit
        console.log title
        if title of debits and limit.getValue() >= debits[title]
          limit.update { $inc: usage: debits[title] }, fin

      dash queue, callback

      fin = queue.fin.bind queue