Comparison

tools/migration/prosody-migrator.lua @ 4240:b3d9063aad4d

tools/migration/prosody-migrator.lua: Add messages to show when migration is in progress
author Matthew Wild <mwild1@gmail.com>
date Tue, 05 Apr 2011 14:34:06 +0100
parent 4239:69fe5fd861e7
child 5021:85b2689dbcfe
comparison
equal deleted inserted replaced
4239:69fe5fd861e7 4240:b3d9063aad4d
123 local reader = require("migrator."..itype).reader(config[from_store]); 123 local reader = require("migrator."..itype).reader(config[from_store]);
124 local writer = require("migrator."..otype).writer(config[to_store]); 124 local writer = require("migrator."..otype).writer(config[to_store]);
125 125
126 local json = require "util.json"; 126 local json = require "util.json";
127 127
128 io.stderr:write("Migrating...\n");
128 for x in reader do 129 for x in reader do
129 --print(json.encode(x)) 130 --print(json.encode(x))
130 writer(x); 131 writer(x);
131 end 132 end
132 writer(nil); -- close 133 writer(nil); -- close
133 134 io.stderr:write("Done!\n");