Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Reliable queuing in the cardano-backer #5

Open
wants to merge 13 commits into
base: feat/watchpoc
Choose a base branch
from

Conversation

minhdo6491
Copy link

Context

  • publishEvent for the cardano-backer is a variable that gets replaced every call. This was previously an object which could work as a queue, but it had the same issue as before where it was all in memory.

Change

  • Add the queue service with push to queue, and publish to on-chain action
  • Add two sub-dbs

Ticket

@minhdo6491 minhdo6491 requested a review from iFergal August 2, 2024 06:42
src/backer/backering.py Outdated Show resolved Hide resolved
src/backer/backering.py Outdated Show resolved Hide resolved
src/backer/queueing.py Outdated Show resolved Hide resolved
src/backer/queueing.py Outdated Show resolved Hide resolved
src/backer/queueing.py Outdated Show resolved Hide resolved
src/backer/queueing.py Outdated Show resolved Hide resolved
@minhdo6491 minhdo6491 requested a review from iFergal August 7, 2024 08:29
src/backer/cardaning.py Outdated Show resolved Hide resolved
src/tests/test_queueing.py Outdated Show resolved Hide resolved
src/backer/backering.py Outdated Show resolved Hide resolved
src/backer/backering.py Outdated Show resolved Hide resolved
src/backer/queueing.py Show resolved Hide resolved
src/backer/queueing.py Outdated Show resolved Hide resolved
src/backer/queueing.py Outdated Show resolved Hide resolved
src/tests/test_queueing.py Show resolved Hide resolved
src/tests/test_queueing.py Outdated Show resolved Hide resolved
src/tests/test_queueing.py Outdated Show resolved Hide resolved
src/tests/test_queueing.py Outdated Show resolved Hide resolved

valid_backer_seals = 0
# Should check when create identifiers only
if ilk in (Ilks.icp, Ilks.rot):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the comment to: @TODO - Should allow other methods, and check that backer trait set most recently to Cardano, as the current comment is wrong.

@@ -376,13 +380,14 @@ def __next__(self):
class MailboxIterable:
TimeoutMBX = 30000000

def __init__(self, mbx, pre, topics, retry=5000, hab=None, ledger=None):
def __init__(self, mbx, pre, topics, retry=5000, hab=None, ledger=None, queue=None):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

queue shouldn't default to None as we need it. Also, I think we can remove ledger completely, and just check if topic == "/receipt"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants