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

Buck worker: Run only one GHC server and proxy requests from other workers #22

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

tek
Copy link
Contributor

@tek tek commented Feb 5, 2025

If --single is passed to the worker, it will use the GHC request handlers only in one worker process and proxy requests to the primary worker in the rest.

Depends on #21

@tek tek requested a review from wavewave February 5, 2025 17:06
@@ -1,4 +1,4 @@
{-# language DataKinds, GADTs #-}
{-# language DataKinds, GADTs, MultiWayIf #-}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's use capital LANGUAGE here. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you insist 😛 😁

MVar Cache ->
ServerRequest 'Normal ExecuteCommand ExecuteResponse ->
IO (ServerResponse 'Normal ExecuteResponse)
executeHandler cache (ServerNormalRequest _ ExecuteCommand {executeCommandArgv, executeCommandEnv}) = do
executeHandler status cache (ServerNormalRequest _ ExecuteCommand {executeCommandArgv, executeCommandEnv}) = do
when False do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better to be (1) removed if it is a temporary debug, (2) commented out with a note or (3) when debugMode and define debugMode = False somewhere at top level.
Just caught on my eyes. not necessary for this PR.

@tek tek force-pushed the tek/central-server branch 2 times, most recently from 7bb12c8 to bcf453e Compare February 6, 2025 14:37
Copy link
Collaborator

@wavewave wavewave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes make sense to me!
@tek Thank you for the sync walk-through!

@tek tek force-pushed the tek/central-server branch from bcf453e to 079c586 Compare February 6, 2025 19:00
@tek tek merged commit 0e5faa6 into main Feb 6, 2025
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.

2 participants