Skip to content

Hotfix/record cleanup as thread#951

Merged
esune merged 4 commits intoopenwallet-foundation:mainfrom
Gavinok:hotfix/record_cleanup_as_thread
Jan 22, 2026
Merged

Hotfix/record cleanup as thread#951
esune merged 4 commits intoopenwallet-foundation:mainfrom
Gavinok:hotfix/record_cleanup_as_thread

Conversation

@Gavinok
Copy link
Contributor

@Gavinok Gavinok commented Jan 21, 2026

No description provided.

@coveralls
Copy link

coveralls commented Jan 21, 2026

Pull Request Test Coverage Report for Build 21220190930

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 88.737%

Totals Coverage Status
Change from base Build 20972736640: 0.005%
Covered Lines: 2072
Relevant Lines: 2335

💛 - Coveralls

WadeBarnes
WadeBarnes previously approved these changes Jan 21, 2026
@WadeBarnes
Copy link
Contributor

@Gavinok, You are missing DCO on the second commit. Since the first two commits cancel each other out, it's best you rebase or squash the changes to remove them from the commit history. That will resolve the DCO issue at the same time.

- Converted `_cleanup_presentation_records` and `_cleanup_connections` calls to run in a thread pool using `asyncio.to_thread()` to prevent blocking the event loop.
- This change improves the overall responsiveness of the cleanup operation in the asynchronous environment.

Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
@Gavinok Gavinok force-pushed the hotfix/record_cleanup_as_thread branch from 6e8ba38 to ba88fee Compare January 21, 2026 17:39
@Gavinok Gavinok requested review from WadeBarnes and esune January 21, 2026 17:42
- Updated docker environment file (.env.example) to clarify variables and improve comments.
- Added a new test suite for the cleanup functionality to ensure it runs non-blocking.
- Implemented tests to verify that cleanup runs in a thread pool, allowing the event loop to remain responsive.
- Included assertions in tests to validate HTTP calls are performed in worker threads and that concurrent tasks can execute during cleanup.

Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
@Gavinok
Copy link
Contributor Author

Gavinok commented Jan 21, 2026

Long term this should be part of #863 and we should migrate away from requests to prevent other blocking related issues

@esune esune merged commit 518887b into openwallet-foundation:main Jan 22, 2026
6 checks passed
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.

4 participants