I have the following problem and I would appreciate if someone could send me an idea, I have tried some, but it did not work.
Consider the code:
while (this.fastaSample.length > 0) {
this.datainputService
.saveToMongoDB(this.fastaSample.slice(0, batch))
.subscribe();
}
It supposes to solve the issue that I cannot send my data in a single http call, since it is too big, I was able to send 10% without issue, more than that, it does not work!
So I thought, I should send smaller batches, and I have consulted sone Q&As here, and they helped me, but did not solve the problem.
I have tried to use await as I did in node, but it does not work; it sends all the http at once, it would be nice to stop/hold the code until the last http call is complete, that would be nice!
Any suggestion?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…