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