     actions.push registerFolder unless indexdefinitions.folder
     async.series actions, (err) -> callback err
 
+
 ###*
 # [TMP] Wait for a given document to be indexed
 #

        setTimeout tryAgain, 100
    else
        callback null

    process.env.INDEXES_PATH ?= path.join persistentDirectory, 'indexes'

indexer = require 'cozy-indexer'
async = require 'async'
log =  require('printit')
    date: true
    prefix: 'indexer'

locker = require '../lib/locker'
db = require('../helpers/db_connect_helper').db_connect()

indexQueue = {}
batchInProgress = false
