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

Reconciliation workers #421

Merged
merged 11 commits into from
Nov 1, 2023
Merged

Reconciliation workers #421

merged 11 commits into from
Nov 1, 2023

Conversation

felipao-mx
Copy link
Member

@felipao-mx felipao-mx commented Oct 26, 2023

  • add tasks to get deposits status
  • add validation to send_order task to retry transfers that are stuck

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #421 (867c913) into master (0910441) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #421      +/-   ##
==========================================
+ Coverage   99.62%   99.64%   +0.01%     
==========================================
  Files          26       27       +1     
  Lines        1081     1133      +52     
  Branches       98      107       +9     
==========================================
+ Hits         1077     1129      +52     
  Partials        4        4              
Flag Coverage Δ
unittests 99.64% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
speid/commands/spei.py 100.00% <100.00%> (ø)
speid/exc.py 100.00% <100.00%> (ø)
speid/helpers/transaction_helper.py 97.36% <100.00%> (+0.22%) ⬆️
speid/models/transaction.py 99.39% <100.00%> (+0.04%) ⬆️
speid/tasks/orders.py 100.00% <100.00%> (ø)
speid/tasks/transactions.py 100.00% <100.00%> (ø)
speid/validations/queries.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0910441...867c913. Read the comment docs.

def check_deposits_status(deposit: Dict) -> None:
req = DepositStatusQuery(**deposit)
try:
transaction = Transaction.objects.get(
Copy link
Member

Choose a reason for hiding this comment

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

Podría ser que tenga multiples resultados, manejar esa excepción también, es poco probable pero puede suceder

self.speid_id,
f'Can not retrieve transaction stp_id: {self.stp_id}',
)
elif not self.stp_id and not status:
Copy link
Member

Choose a reason for hiding this comment

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

Podría darse el caso de realizar una devolución a una txn aplicada, me parece mejor para este caso lanzar la excepción TransactionNeedManualReviewError

Copy link
Member

@pachCode pachCode left a comment

Choose a reason for hiding this comment

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

Algunos comentarios

@felipao-mx felipao-mx merged commit 3c8c204 into master Nov 1, 2023
11 checks passed
@felipao-mx felipao-mx deleted the reconciliation-workers branch November 1, 2023 17:06
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.

2 participants