Files
openhuman/src
94f7531d69 Make QuickJS runtime fully synchronous to fix async deadlock (#422)
* feat(sync): implement background sync handling in event loop

- Introduced a mechanism to track background sync status with a new `sync_in_flight` flag.
- Updated the event loop to check for sync completion and persist state to memory upon completion.
- Modified the `handle_sync` function to fire the `onSync` handler in the JS runtime asynchronously, allowing for immediate return while the sync process runs in the background.
- Enhanced logging to provide feedback on sync status and completion.

* fix(net): disable connection pooling in HTTP client to prevent hanging on POST requests through staging proxy

* Enhance promise handling in JS call processing

- Added logging to track promise resolution progress and timeout events.
- Implemented a polling mechanism to drive the QuickJS job queue until promises resolve or timeout occurs.
- Introduced debug information logging for stalled promises to aid in troubleshooting.
- Improved feedback during polling to indicate ongoing operations.

This update aims to improve the reliability and debuggability of asynchronous JavaScript calls within the application.

* Refactor JS fetch implementation for synchronous behavior

- Updated the `fetch` function in the QuickJS library to operate synchronously from the JavaScript perspective, blocking the thread until the HTTP request completes.
- Enhanced error handling and logging for HTTP requests, including timeouts and response details.
- Removed the previous asynchronous implementation to streamline the fetch operation.
- Cleaned up the code by removing unused comments and improving readability.

This change aims to improve the consistency and reliability of network operations within the application.

* Fix Rust formatting in ops_net.rs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 23:28:18 -07:00
..
2026-04-06 21:11:27 -07:00
2026-04-05 22:14:29 -07:00
2026-04-05 22:14:29 -07:00