Commit 1ea0ce1f authored by Matija Obreza's avatar Matija Obreza
Browse files

Import requires a sleep(100ms) to be friendly to the server

parent 3f9f789c
......@@ -154,7 +154,6 @@ const importDescriptor = async (descriptor) => {
descriptor.vocabulary = CONTROLLEDVOCAB_MAP.get(descriptor.vocabularyId);
} else {
const vocab = await fixVocabulary(descriptor.code, descriptor.code_title, descriptor.code_description).catch((err) => {
console.log(`Using "N/A" vocabulary for ${descriptor.title} ${err.message}`);
return [
......@@ -184,6 +183,7 @@ const importDescriptor = async (descriptor) => {
return createDescriptor(descriptor).then((descriptor) => {
console.log(`Successfully imported ${descriptor.uuid}`);
sleep.msleep(100);
return descriptor;
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment