forked from coolaj86/walnut.js
		
	do not attempt dot files
This commit is contained in:
		
							parent
							
								
									b6493ac916
								
							
						
					
					
						commit
						c9c6344682
					
				| @ -39,7 +39,7 @@ module.exports.create = function (conf, deps) { | ||||
|     var fs = PromiseA.promisifyAll(require('fs')); | ||||
| 
 | ||||
|     // deps : { memstore, sqlstores, clientSqlFactory, systemSqlFactory }
 | ||||
|      | ||||
| 
 | ||||
|     // XXX this is a no-no (file system access in a worker, cannot be statically analyzed)
 | ||||
|     // TODO regenerate a static file of all requires on each install
 | ||||
|     // TODO read system config db to find which services auto-start
 | ||||
| @ -47,8 +47,11 @@ module.exports.create = function (conf, deps) { | ||||
|     return fs.readdirAsync(conf.servicespath).then(function (nodes) { | ||||
|       var promise = PromiseA.resolve(); | ||||
|       var services = []; | ||||
|        | ||||
| 
 | ||||
|       nodes.forEach(function (node) { | ||||
|         if (!/^\./.test(node)) { | ||||
|           return; | ||||
|         } | ||||
|         promise = promise.then(function () { | ||||
|           return loadService(node).then(function (srv) { | ||||
|             if (!srv) { | ||||
| @ -90,7 +93,7 @@ module.exports.create = function (conf, deps) { | ||||
|   function startServices(services) { | ||||
|     var promise = PromiseA.resolve(); | ||||
|     var servicesMap = {}; | ||||
|      | ||||
| 
 | ||||
|     services.forEach(function (srv) { | ||||
|       promise = promise.then(function () { | ||||
|         return startService(srv).then(function (service) { | ||||
| @ -100,7 +103,7 @@ module.exports.create = function (conf, deps) { | ||||
|           } | ||||
|           srv.service = service; | ||||
|           servicesMap[srv.name] = srv; | ||||
|         });  | ||||
|         }); | ||||
|       }); | ||||
|     }); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user