Skip to content

Conversation

@rkeene
Copy link
Member

@rkeene rkeene commented Jan 22, 2026

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.

@xescure
Copy link

xescure commented Jan 22, 2026

Thank you

Copy link
Contributor

Copilot AI left a 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 autoRunRunning flag 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

@rkeene rkeene marked this pull request as ready for review January 22, 2026 22:55
@sonarqubecloud
Copy link

@rkeene rkeene merged commit f4ca7d5 into main Jan 26, 2026
2 checks passed
@rkeene rkeene deleted the feature/fx-anchor-autorun-on-http-sync branch January 26, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants