Use good defaults

This commit is contained in:
Daniel García Aubert 2019-11-14 13:14:31 +01:00
parent 77e6fb8225
commit f87c432744
2 changed files with 5 additions and 7 deletions

View File

@ -87,14 +87,11 @@ module.exports = class ApiRouter {
global.log4js.getLogger('[windshaft]') : global.log4js.getLogger('[windshaft]') :
null; null;
const mapStoreOptions = { const mapStore = new windshaft.storage.MapStore({
pool: redisPool, pool: redisPool,
expire_time: serverOptions.grainstore.default_layergroup_ttl,
logger: windshaftLogger logger: windshaftLogger
}; });
if (Number.isFinite(serverOptions.grainstore.default_layergroup_ttl)) {
mapStoreOptions.expire_time = serverOptions.grainstore.default_layergroup_ttl;
}
const mapStore = new windshaft.storage.MapStore(mapStoreOptions);
const rendererFactory = createRendererFactory({ redisPool, serverOptions, environmentOptions }); const rendererFactory = createRendererFactory({ redisPool, serverOptions, environmentOptions });

View File

@ -16,7 +16,8 @@ module.exports = _.extend({}, serverOptions, {
}, },
cachedir: global.environment.millstone.cache_basedir, cachedir: global.environment.millstone.cache_basedir,
mapnik_version: global.environment.mapnik_version || mapnik.versions.mapnik, mapnik_version: global.environment.mapnik_version || mapnik.versions.mapnik,
gc_prob: 0 // run the garbage collector at each invocation gc_prob: 0, // run the garbage collector at each invocation
default_layergroup_ttl: global.environment.mapConfigTTL || 7200
}, },
renderer: { renderer: {
mapnik: { mapnik: {