Avoid to pass undefined layergroupTTL
This commit is contained in:
parent
ccd01e6da5
commit
77e6fb8225
@ -86,11 +86,15 @@ module.exports = class ApiRouter {
|
||||
const windshaftLogger = environmentOptions.log_windshaft && global.log4js ?
|
||||
global.log4js.getLogger('[windshaft]') :
|
||||
null;
|
||||
const mapStore = new windshaft.storage.MapStore({
|
||||
|
||||
const mapStoreOptions = {
|
||||
pool: redisPool,
|
||||
expire_time: serverOptions.grainstore.default_layergroup_ttl,
|
||||
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 });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user