Drop extended styles. Closes #58. Add some documentation in header.

This commit is contained in:
Sandro Santilli 2012-12-07 20:20:21 +01:00
parent 9d52b8b11f
commit 081cc41a34
2 changed files with 19 additions and 3 deletions

View File

@ -2,6 +2,7 @@
-----
* Reduce default extent to allow for consistent proj4 round-tripping
* Enhance reset_styles script to use full configuration (#62)
* Have reset_styles script also drop extended keys (#58)
* Fix example postgis parameter for simplifying input geoms (#63)
1.1.3 (30//11//12)

View File

@ -1,5 +1,18 @@
#!/usr/bin/env node
/*
This scripts drops all extended map_style keys in redis and regenerates
the XML caches in all the base ones to target the configured mapnik_version.
Optionally (with --convert) it also re-writes the CartoCSS if needed
to target the configured mapnik_version.
It is recommended to make a backup of the redis database before using
this script.
*/
var path = require('path');
// Reset all styles in the store
@ -56,10 +69,12 @@ client.on('connect', function() {
var k = matches.shift();
if ( /map_style\|.*\|.*\|/.test(k) ) {
//console.warn("Key " + k + " is EXTENDED, skipping");
// TODO: drop instead ?
// See https://github.com/Vizzuality/Windshaft-cartodb/issues/58
processNext();
//console.warn("Key " + k + " is EXTENDED, dropping");
client.del(k, function(err) {
if ( err ) console.warn("Error dropping key " + k);
processNext();
});
return;
}