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 ?
|
const windshaftLogger = environmentOptions.log_windshaft && global.log4js ?
|
||||||
global.log4js.getLogger('[windshaft]') :
|
global.log4js.getLogger('[windshaft]') :
|
||||||
null;
|
null;
|
||||||
const mapStore = new windshaft.storage.MapStore({
|
|
||||||
|
const mapStoreOptions = {
|
||||||
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 });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user