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

engineapi: Add Pectra banner #13785

Merged
merged 3 commits into from
Feb 13, 2025
Merged

engineapi: Add Pectra banner #13785

merged 3 commits into from
Feb 13, 2025

Conversation

somnathb1
Copy link
Contributor

No description provided.

@@ -78,6 +78,7 @@ type EngineServer struct {
}

const fcuTimeout = 1000 // according to mathematics: 1000 millisecods = 1 second
var printPectraBanner = true
Copy link
Member

@taratorio taratorio Feb 13, 2025

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.

Copy link
Contributor Author

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

@somnathb1 somnathb1 enabled auto-merge (squash) February 13, 2025 18:31
@somnathb1 somnathb1 merged commit cc17bd0 into main Feb 13, 2025
13 checks passed
@somnathb1 somnathb1 deleted the som/pectra_banner_main branch February 13, 2025 19:04
somnathb1 added a commit that referenced this pull request Feb 13, 2025
@yperbasis yperbasis added this to the 3.0.0-beta2 milestone Feb 14, 2025
somnathb1 added a commit that referenced this pull request Feb 14, 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.

3 participants