             # note that our URL files are symlinks to the ID files, and
             # node's FS.readFile() follows symlinks natively. sweet!
             if json = readFile (getFilePathForURL url), _
-                enqueueIfNeeded new Content JSON.parse json
+                enqueueIfNeeded _, new Content JSON.parse json
             else
                 null
 

        # so the only thing we do here is fail-fast.
        throw err if err

# Enqueues the given content for conversion if we're processing old content and
# this content hasn't been processed yet. Returns the content always.
#
# TODO: This is open to race conditions of multiple enqueues and thus workers.
# We should ideally synchronize access, but we should also be robust to worker
# failures or timeouts in that case, e.g. with a queue visibility timeout.
#
enqueueIfNeeded = (content) ->
    if config.PROCESS_OLD_CONTENT and not content.ready
        enqueueForConversion content
    content



        obj[prop] = val for prop, val of @
        obj

    # Mark that this content is actively being processed (internally) now.
    _markActive: (_) ->
        @_data.active = true
        @_data.activeAt = new Date().toISOString()
        # let `finishedAt` remain where it was previously, for debugging
        @_data.ready = false
        @_data.failed = false
        @_data.progress = 0
        delete @_data.dzi
        @_save _

    markReady: (dzi, _) ->
        @_data.active = false
        # let `activeAt` remain where it was, for debugging
        @_data.finishedAt = new Date().toISOString()
        @_data.ready = true
        @_data.failed = false
        @_data.progress = 1
