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')); |     var fs = PromiseA.promisifyAll(require('fs')); | ||||||
| 
 | 
 | ||||||
|     // deps : { memstore, sqlstores, clientSqlFactory, systemSqlFactory }
 |     // deps : { memstore, sqlstores, clientSqlFactory, systemSqlFactory }
 | ||||||
|      | 
 | ||||||
|     // XXX this is a no-no (file system access in a worker, cannot be statically analyzed)
 |     // 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 regenerate a static file of all requires on each install
 | ||||||
|     // TODO read system config db to find which services auto-start
 |     // 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) { |     return fs.readdirAsync(conf.servicespath).then(function (nodes) { | ||||||
|       var promise = PromiseA.resolve(); |       var promise = PromiseA.resolve(); | ||||||
|       var services = []; |       var services = []; | ||||||
|        | 
 | ||||||
|       nodes.forEach(function (node) { |       nodes.forEach(function (node) { | ||||||
|  |         if (!/^\./.test(node)) { | ||||||
|  |           return; | ||||||
|  |         } | ||||||
|         promise = promise.then(function () { |         promise = promise.then(function () { | ||||||
|           return loadService(node).then(function (srv) { |           return loadService(node).then(function (srv) { | ||||||
|             if (!srv) { |             if (!srv) { | ||||||
| @ -90,7 +93,7 @@ module.exports.create = function (conf, deps) { | |||||||
|   function startServices(services) { |   function startServices(services) { | ||||||
|     var promise = PromiseA.resolve(); |     var promise = PromiseA.resolve(); | ||||||
|     var servicesMap = {}; |     var servicesMap = {}; | ||||||
|      | 
 | ||||||
|     services.forEach(function (srv) { |     services.forEach(function (srv) { | ||||||
|       promise = promise.then(function () { |       promise = promise.then(function () { | ||||||
|         return startService(srv).then(function (service) { |         return startService(srv).then(function (service) { | ||||||
| @ -100,7 +103,7 @@ module.exports.create = function (conf, deps) { | |||||||
|           } |           } | ||||||
|           srv.service = service; |           srv.service = service; | ||||||
|           servicesMap[srv.name] = srv; |           servicesMap[srv.name] = srv; | ||||||
|         });  |         }); | ||||||
|       }); |       }); | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user