MCPcopy
hub / github.com/kickscondor/fraidycat / fetchfeed

Function fetchfeed

src/js/storage.js:494–508  ·  view source on GitHub ↗
(follow, flags)

Source from the content-addressed store, hash-verified

492 // we don't need to recompute all the hashes necessarily.
493 //
494 async fetchfeed(follow, flags) {
495 let id = follow.id || urlToID(urlToNormal(follow.url))
496 this.noteUpdate([id], false)
497 // console.log(`Updating ${followTitle(follow)}`)
498 let feed
499 try {
500 feed = await this.refetch(id, follow, flags)
501 } finally {
502 this.fetched[id] =
503 {at: Number(new Date()), delay: Math.ceil(50 + (Math.random() * 50))}
504 this.localSet('fraidycat', {fetched: this.fetched})
505 this.noteUpdate([id], true)
506 }
507 return feed
508 },
509
510 //
511 // Saving, fetching and reading follows. I/O of any kind.

Callers

nothing calls this directly

Calls 3

urlToIDFunction · 0.90
urlToNormalFunction · 0.90
localSetMethod · 0.45

Tested by

no test coverage detected