I got my exporter's testrun() function to run without errors, but the importer plugin still gets stuck, just in a different way.
It hangs with this message displayed:
State: busy, by event: exporter.require | Phase: Progress: 0%
With nothing in the log.
Then if I restart nodebb and RESUME the import, I get this:
State: idle, by event: | Phase: categoriesImportStart Progress: 0/1, 0.0000000%
Logs (in reversed order, newest on top)
[2018-06-04T15:15:15.858Z] current phase: categoriesImportStart
[2018-06-04T15:15:15.857Z] Phase ::: categoriesImportStart
[2018-06-04T15:15:15.856Z] Skipping importGroups Phase
My category import function is really simple. The old forum doesn't have categories, so I generate a fake one.
var cid;
Exporter.getPaginatedCategories = function(start, limit, callback) {
callback = !_.isFunction(callback) ? noop : callback;
var err, map;
cid = new mongoose.Types.ObjectId;
console.log( cid );
map = {};
map[ cid ] = {
"_cid": cid, // REQUIRED
"_name": "General Discussion 2", // REQUIRED
"_description": "A place to talk about whatever you want" // OPTIONAL
};
callback( null, map );
};
Update:
I just ran the importer with a "null" exporter (one that just outputs empty hashes) and I'm getting the same behavior.