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

A unified, robust and bug-free connection management interface for the ORM #1001

Merged
merged 31 commits into from
Mar 20, 2022
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c2a398b
- Initial working commit for refactored connection management.
blazing-gig Dec 5, 2021
c5c7d31
- Refactored test_init.py to conform to the new connection management…
blazing-gig Dec 5, 2021
1fd9dac
- Fixed linting errors (flake8 and mypy)
blazing-gig Dec 5, 2021
faa4d87
- Modified comment
blazing-gig Dec 5, 2021
79b187a
- Code cleanup
blazing-gig Dec 6, 2021
8184432
- Fixed style issues
blazing-gig Dec 7, 2021
d3e7403
- Fixed mysql breaking tests
blazing-gig Dec 19, 2021
212c8f7
Merge remote-tracking branch 'origin/develop' into feat/connection_mgmt
aditya-n-invcr Dec 20, 2021
adacec3
Merge remote-tracking branch 'origin/develop' into feat/connection_mgmt
aditya-n-invcr Jan 11, 2022
18912ef
- Merged latest head from develop and fixed breaking tests
blazing-gig Jan 13, 2022
9ed0e71
- Fixed style and lint issues
blazing-gig Jan 13, 2022
69d947e
- Fixed code quality issues (codacy)
blazing-gig Jan 13, 2022
3b3b2e5
- Refactored core and test files to use the new connection interface
blazing-gig Jan 13, 2022
a7f47ba
- Fixed style and lint errors
blazing-gig Jan 13, 2022
e8e529b
- Added unit tests for the new connection interface
blazing-gig Jan 18, 2022
ab7051e
- Added docs for the new connection interface
blazing-gig Jan 18, 2022
d99aeda
- Fixed codacy check
blazing-gig Jan 18, 2022
9adabf7
- Fixed codacy check
blazing-gig Jan 18, 2022
1edd813
- Fixed codacy check
blazing-gig Jan 18, 2022
d7e7048
- Fixed codacy check
blazing-gig Jan 18, 2022
c04d1eb
- Fixed codacy check
blazing-gig Jan 18, 2022
32f87e4
- Refactored Tortoise.close_connections to use the connections.close_…
blazing-gig Jan 19, 2022
fbfaff8
- Updated docs
blazing-gig Jan 19, 2022
0468d81
Merge remote-tracking branch 'origin/develop' into feat/connection_mgmt
aditya-n-invcr Feb 16, 2022
522945e
Merge remote-tracking branch 'origin/develop' into feat/connection_mgmt
aditya-n-invcr Feb 25, 2022
58d8843
- Removed current_transaction_map occurrences in code
blazing-gig Mar 5, 2022
092448b
Merge remote-tracking branch 'origin/develop' into feat/connection_mgmt
aditya-n-invcr Mar 5, 2022
ee0a189
- Fixed breaking tests due to merge
blazing-gig Mar 16, 2022
8711b4f
- Fixed lint errors
blazing-gig Mar 16, 2022
7518a02
- Updated CHANGELOG.rst
blazing-gig Mar 18, 2022
eb6fb02
Merge remote-tracking branch 'origin/develop' into feat/connection_mgmt
aditya-n-invcr Mar 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/develop' into feat/connection_mgmt
# Conflicts:
#	tortoise/backends/base/client.py
  • Loading branch information
aditya-n-invcr committed Dec 20, 2021
commit 212c8f7e8fdd443794183a228fb874766bc46788
4 changes: 2 additions & 2 deletions tortoise/backends/base/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ async def ensure_connection(self) -> None:

async def __aenter__(self):
await self.ensure_connection()
await self.lock.acquire()
await self.lock.acquire() # type:ignore
self.token = connections.set(self.connection_name, self.connection)
await self.connection.start()
return self.connection
Expand All @@ -253,7 +253,7 @@ async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
else:
await self.connection.commit()
connections.reset(self.token)
self.lock.release()
self.lock.release() # type:ignore


class TransactionContextPooled(TransactionContext):
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.