function queue() {
            while (current < config.concurLimit && files.length > 0) {
                var file = files.shift()

                allFiles.push(Promise.resolve(file).then(function(file) {
                    return clean.processOneClean(file).then(function(filePath) {
                        if (typeof filePath === 'string') {
                            filesCleaned.push(filePath)
                        }
                        proceed()
                    }).catch(function(err) {
                        proceed()
                        functions.logError(err)
                        throw err
                    })
                }))

                current++
            }
        }
function queue() {
            while (current < config.concurLimit && files.length > 0) {
                var file = files.shift()

                allFiles.push(Promise.resolve(file).then(function(file) {
                    return clean.processOneClean(file).then(function(filePath) {
                        if (typeof filePath === 'string') {
                            filesCleaned.push(filePath)
                        }
                        proceed()
                    }).catch(function(err) {
                        proceed()
                        functions.logError(err)
                        throw err
                    })
                }))

                current++
            }
        }
function queue ( ) { while ( current < config . concurLimit && files . length > 0 ) { var file = files . shift ( ) allFiles . push ( Promise . resolve ( file ) . then ( function ( file ) { return clean . processOneClean ( file ) . then ( function ( filePath ) { if ( typeof filePath === 'string' ) { filesCleaned . push ( filePath ) } proceed ( ) } ) . catch ( function ( err ) { proceed ( ) functions . logError ( err ) throw err } ) } ) ) current ++ } }
proceed
proceed