-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
engineapi: Add Pectra banner #13785
engineapi: Add Pectra banner #13785
Conversation
turbo/engineapi/engine_server.go
Outdated
@@ -78,6 +78,7 @@ type EngineServer struct { | |||
} | |||
|
|||
const fcuTimeout = 1000 // according to mathematics: 1000 millisecods = 1 second | |||
var printPectraBanner = true |
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.
I'd suggest to move that to EngineServer
as a printPectraBanner
struct attribute - it is good practice to avoid using global variables for state like this.
It also should probably be an atomic.Bool given it is set to false
upon requests that can be asynchronous.
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.
I did that to make things as simple as possible to not have side-effects. But, I will move the var to the struct. atomic.Bool
isn't needed though, because a lock is placed to the struct at the beginning of the func
No description provided.