mirror of
https://github.com/dergigi/boris.git
synced 2026-01-26 02:04:58 +01:00
refactor: disable account queue globally
Set accounts.disableQueue = true on AccountManager during initialization: - Applies to all accounts automatically - No need for temporary queue toggling in individual operations - Makes all bunker requests instant (no internal queueing) Removed temporary queue disabling from bookmarkProcessing.ts since it's now globally disabled. Updated Amber.md to document the global approach. This eliminates the root cause of decrypt hangs - requests no longer wait in an internal queue for previous requests to complete.
This commit is contained in:
@@ -189,21 +189,11 @@ export async function collectBookmarksFromEvents(
|
||||
// Decrypt events sequentially
|
||||
const privateItemsAll: IndividualBookmark[] = []
|
||||
if (decryptJobs.length > 0 && signerCandidate) {
|
||||
// Disable queueing for batch operations to avoid blocking on user interaction
|
||||
const accountWithQueue = activeAccount as { disableQueue?: boolean }
|
||||
const originalQueueState = accountWithQueue.disableQueue
|
||||
accountWithQueue.disableQueue = true
|
||||
|
||||
try {
|
||||
for (const job of decryptJobs) {
|
||||
const privateItems = await decryptEvent(job.evt, activeAccount, signerCandidate, job.metadata)
|
||||
if (privateItems && privateItems.length > 0) {
|
||||
privateItemsAll.push(...privateItems)
|
||||
}
|
||||
for (const job of decryptJobs) {
|
||||
const privateItems = await decryptEvent(job.evt, activeAccount, signerCandidate, job.metadata)
|
||||
if (privateItems && privateItems.length > 0) {
|
||||
privateItemsAll.push(...privateItems)
|
||||
}
|
||||
} finally {
|
||||
// Restore original queue state
|
||||
accountWithQueue.disableQueue = originalQueueState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user