Closed sammacbeth closed 6 years ago
Does this event get emitted when the metadata is fully synced with a remote? Because that's kinda what I had the delay there for.
Would you mind deleting the waitReplication()
function and the REPLICATION_DELAY
variable since it's no longer needed?
That seems to be the case. I just saw the snippet in node-dat-archive and assume that is what is needed here too.
I've removed waitReplication()
and REPLICATION_DELAY
now.
Awesome, thank you so much for the fix! I'll need to port it over to dat-gateway at some point, too. :D
By the way, I've recently been working on some other improvements for dat-archive-web in order to support dat-polyfill better so master is a little bit ahead of what's on NPM.
Would you mind pointing to github in your package.json for the time being?
I'm not 100% sure how stable it is.
Avoid the 3s timeout when setting up replication by using the metadata status. Is how node-dat-archive is checking for data availability when a new archive is created.
Testing with my DatArchive Test suite, this speeds up the initialisation enough to beat the 2s timeouts that these tests have.