mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-10 06:43:00 +00:00
perf: bound DM subsystem network concurrency & fix CI lint buffer
- Replaced unbounded `Promise.all` with `pMap` and `RELAY_BACKGROUND_CONCURRENCY || 3` in `js/nostr/dmSignalEvents.js` and `js/services/dmNostrService.js` to prevent network saturation. - Increased `maxBuffer` in `scripts/check-hex.js` to 10MB to prevent `ENOBUFS` when git text search matches large minified files in CI. - Verified documentation in `content/docs/guides/upload-content.md` correctly specifies port 3000. - Passed all unit and integration tests. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
799c336bf3
commit
b8832dcae8
5 files changed
+18
-10
No files matched your search
@@ -144,7 +144,7 @@ export async function publishDmReadReceipt(
|
||||
const publishResults = await pMap(
|
||||
relayList,
|
||||
(url) => publishEventToRelay(client.pool, url, signedEvent),
|
||||
{ concurrency: RELAY_BACKGROUND_CONCURRENCY },
|
||||
{ concurrency: RELAY_BACKGROUND_CONCURRENCY || 3 },
|
||||
);
|
||||
|
||||
const acceptedRelays = publishResults
|
||||
@@ -287,7 +287,7 @@ export async function publishDmTypingIndicator(
|
||||
const publishResults = await pMap(
|
||||
relayList,
|
||||
(url) => publishEventToRelay(client.pool, url, signedEvent),
|
||||
{ concurrency: RELAY_BACKGROUND_CONCURRENCY },
|
||||
{ concurrency: RELAY_BACKGROUND_CONCURRENCY || 3 },
|
||||
);
|
||||
|
||||
const acceptedRelays = publishResults
|
||||
|
||||
@@ -279,7 +279,7 @@ class DmNostrService {
|
||||
async (relayUrl) => {
|
||||
await this.connectRelay(relayUrl);
|
||||
},
|
||||
{ concurrency: RELAY_BACKGROUND_CONCURRENCY },
|
||||
{ concurrency: RELAY_BACKGROUND_CONCURRENCY || 3 },
|
||||
);
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ class DmNostrService {
|
||||
|
||||
return { ...result, relayUrl };
|
||||
},
|
||||
{ concurrency: RELAY_BACKGROUND_CONCURRENCY },
|
||||
{ concurrency: RELAY_BACKGROUND_CONCURRENCY || 3 },
|
||||
);
|
||||
|
||||
return results;
|
||||
|
||||
Reference in new issue
Block a user