subscribeForSigits and async gift wrap processing #194

Open
opened 2024-09-10 12:39:53 +00:00 by enes · 0 comments
Member

It was noticed we stop receiving new gift wraps (subscribes for events get closed), and only after refreshing we would get the new updates.

The issue was compounded by the race condition (related to the #193) and inability to check if we are already processing a sigit which caused us to show stale sigit data.

Additionally, processing can fail silently while at the same time we mark the gift wrap as processed.

To solve this, we need to:

  • update subscriptions so they stay open during the whole session,
  • make sure we add a mechanism to check if we are already processing a sigit (and to keep only the newest one)
  • make sure if we fail to process a gift wrap to actually remove it from processedGiftWraps list
It was noticed we stop receiving new gift wraps (subscribes for events get closed), and only after refreshing we would get the new updates. The issue was compounded by the race condition (related to the https://git.nostrdev.com/sigit/sigit.io/pulls/193) and inability to check if we are already processing a sigit which caused us to show stale sigit data. Additionally, processing can fail silently while at the same time we mark the gift wrap as processed. To solve this, we need to: - update subscriptions so they stay open during the whole session, - make sure we add a mechanism to check if we are already processing a sigit (and to keep only the newest one) - make sure if we fail to process a gift wrap to actually remove it from `processedGiftWraps` list
enes added the
Kind/Bug
Priority
High
labels 2024-09-10 12:39:53 +00:00
enes added the
Kind/Enhancement
label 2024-09-11 08:56:23 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sigit/sigit.io#194
No description provided.