mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-11 03:35:49 +00:00
Debug the pipes
This commit is contained in:
+22
-16
@@ -194,20 +194,26 @@ gulp.task('publish:search-index', (cb) => {
|
||||
env: env
|
||||
};
|
||||
|
||||
return exec('giddyup leader check', opts, function(err, stdout, stderr) {
|
||||
console.log('Error:', err);
|
||||
console.log('Stdout:', stdout);
|
||||
console.log('Stderr:', stderr);
|
||||
}).on('close', code => {
|
||||
if (code === 0) {
|
||||
console.log('Publishing to algolia', process.env.ALGOLIA_INDEX_NAME);
|
||||
atomicalgolia(process.env.ALGOLIA_INDEX_NAME, process.env.ALGOLIA_INDEX_FILE, (err, result) => {
|
||||
console.log(result);
|
||||
cb(err);
|
||||
});
|
||||
} else {
|
||||
console.log('I am not the leader (' + code + ')');
|
||||
cb(new Error('Not the leader'));
|
||||
}
|
||||
});
|
||||
|
||||
console.log('Waiting');
|
||||
setTimeout(() => {
|
||||
console.log('Done');
|
||||
exec('giddyup leader check', opts, function(err, stdout, stderr) {
|
||||
console.log('Error:', err);
|
||||
console.log('Stdout:', stdout);
|
||||
console.log('Stderr:', stderr);
|
||||
}).on('close', code => {
|
||||
if (code === 0) {
|
||||
console.log('Publishing to algolia', process.env.ALGOLIA_INDEX_NAME);
|
||||
atomicalgolia(process.env.ALGOLIA_INDEX_NAME, process.env.ALGOLIA_INDEX_FILE, (err, result) => {
|
||||
console.log(result);
|
||||
cb(err);
|
||||
});
|
||||
} else {
|
||||
console.log('I am not the leader (' + code + ')');
|
||||
cb(new Error('Not the leader'));
|
||||
}
|
||||
});
|
||||
}, 10000);
|
||||
|
||||
});
|
||||
|
||||
@@ -65,6 +65,10 @@ nodes.forEach(node => {
|
||||
// objectID is not quite unique yet so hash the entire object
|
||||
paragraphOut.objectID = md5(JSON.stringify(paragraphOut));
|
||||
|
||||
if (paragraphOut.objectID === "d41d8cd98f00b204e9800998ecf8427e") {
|
||||
console.log(paragraphOut)
|
||||
console.log(JSON.stringify(paragraphOut))
|
||||
}
|
||||
|
||||
nue.push(paragraphOut);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user