 path = require 'path'
+
 # set env for cozy-indexer
 # if we have APPLICATION_PERSISTENT_DIRECTORY, we have the new controller
 # and we use the provided directory

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

indexer = require 'cozy-indexer'
db = require('../helpers/db_connect_helper').db_connect()
async = require 'async'
locker = require '../lib/locker'
log =  require('printit')
    date: true
    prefix: 'indexer'

indexQueue = {}
batchInProgress = false

    actions.push registerFolder unless indexdefinitions.folder
    async.series actions, (err) -> callback err


###*
# [TMP] Wait for a given document to be indexed
#
