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

Request node settings #227

Merged
merged 12 commits into from
Jun 9, 2023
Merged

Conversation

miiu96
Copy link
Contributor

@miiu96 miiu96 commented Jun 7, 2023

  • Implemented a mechanism that will request the node settings then the indexer binary will start.

@bogdan-rosianu bogdan-rosianu self-requested a review June 8, 2023 10:27
cmd/elasticindexer/main.go Outdated Show resolved Hide resolved
process/dataindexer/dataIndexer.go Outdated Show resolved Hide resolved
return nil
}

// CurrentSettings will set the provided settings
Copy link
Contributor

Choose a reason for hiding this comment

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

comment not updated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@iulianpascalau iulianpascalau self-requested a review June 9, 2023 08:09
for {
err := host.Send([]byte{}, outport.TopicSettings)
if err != nil {
time.Sleep(time.Duration(retryDurationInSec) * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

please refactor this to allow the normal closing of the node if the settings were not received in time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

for {
select {
case <-timer.C:
err := host.Send([]byte{}, outport.TopicSettings)
Copy link
Contributor

Choose a reason for hiding this comment

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

make([]byte, 0) instead of literal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@miiu96 miiu96 merged commit dd828c1 into feat/refactoring-and-improves Jun 9, 2023
@iulianpascalau iulianpascalau deleted the request-node-setting branch June 9, 2023 12:33
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