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

Backend/refactor/ #BKN-2787 apply finalizer refactor #33

Closed

Conversation

roman-bodavskiy
Copy link
Contributor

@roman-bodavskiy roman-bodavskiy commented Mar 6, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

Description

Additional Changes

  • This PR modifies the database schema (database migration added)
  • This PR modifies dhall configs/environment variables

Motivation and Context

https://juspay.atlassian.net/browse/BKN-2787

Refactored this PR by Pavel Zarubin
#26
In my solution we don't need to make SqlDB monad type polymorphic and change all existing queries.
Instead I use existential quantification:

data SqlDBEnv = forall m.
  Finalize m =>
  SqlDBEnv
  { currentTime :: UTCTime,
    actions :: m ()
  }

How did you test it?

Tested locally. Tested transaction inside of transaction. All finalizer actions worked as expected.

Checklist

  • I formatted the code and addressed linter errors ./dev/format-all-files.sh
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@roman-bodavskiy roman-bodavskiy force-pushed the feature/BKN-2787/apply-finalizer-refactor branch from 75fe3d9 to 9a5caee Compare March 7, 2023 05:08
@roman-bodavskiy roman-bodavskiy force-pushed the feature/BKN-2787/apply-finalizer-refactor branch from 9a5caee to a0e5da3 Compare March 21, 2023 08:54
@roman-bodavskiy roman-bodavskiy force-pushed the feature/BKN-2787/apply-finalizer-refactor branch from a0e5da3 to 8b6c0ad Compare March 22, 2023 06:03
@roman-bodavskiy roman-bodavskiy changed the title [WIP] Backend/refactor/ #BKN-2787 apply finalizer refactor Backend/refactor/ #BKN-2787 apply finalizer refactor Mar 23, 2023
@roman-bodavskiy roman-bodavskiy added the enhancement New feature or request label Mar 23, 2023
@roman-bodavskiy roman-bodavskiy self-assigned this Apr 9, 2023
@roman-bodavskiy
Copy link
Contributor Author

using Beam instead of Esqueleto now
transactions not required

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

Successfully merging this pull request may close these issues.

3 participants