-
Notifications
You must be signed in to change notification settings - Fork 0
Change the way the FX Service Auto-Run works #163
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
Conversation
|
Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the FX Service Auto-Run mechanism from an interval-based background process to a request-triggered approach, making it more suitable for serverless environments where background intervals don't work well.
Changes:
- Replaced interval-based queue processing with request-triggered processing
- Queue processing now occurs synchronously during HTTP request handling before responding
- Added mutex mechanism using
autoRunRunningflag to prevent concurrent queue processing
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/services/fx/server.ts | Removed interval-based auto-run, added request-triggered queue processing with mutex flag, processes queue for up to 15s before responding |
| src/services/fx/server.test.ts | Added comprehensive tests for concurrent request handling and multiple servers sharing a queue, removed debug console.log statement |
|



This change alters the way FX AutoRun works by running the queue prior to responding to HTTP requests, which is better suited to Serverless environments.