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

Add option to run with notify fifo #51

Merged
merged 4 commits into from
Nov 18, 2022
Merged

Add option to run with notify fifo #51

merged 4 commits into from
Nov 18, 2022

Conversation

glrf
Copy link
Contributor

@glrf glrf commented Nov 16, 2022

Summary

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog
  • Update the documentation.
  • Update tests.
  • Link this PR to related issues.

@glrf glrf added the enhancement New feature or request label Nov 16, 2022
@glrf glrf self-assigned this Nov 16, 2022
@glrf glrf force-pushed the feat/fifo branch 8 times, most recently from be9d035 to fcb3e70 Compare November 17, 2022 14:21
@glrf glrf changed the base branch from master to change/refactor-main November 17, 2022 14:23
@glrf glrf marked this pull request as ready for review November 17, 2022 14:24
@glrf glrf requested a review from a team November 17, 2022 14:24
Copy link
Member

@simu simu left a comment

Choose a reason for hiding this comment

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

LGTM. This looks much cleaner now that it's built on a base which has some infrastructure in place to accommodate different modes of operation compared to my PoC.

Comment on lines +40 to +42
// Yes, this can actually be parsed as a CSV file with spaces as separators and it handles quoted string the same way a shell does.
r := csv.NewReader(h.pipe)
r.Comma = ' '
Copy link
Member

Choose a reason for hiding this comment

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

very nice 😄

main.go Outdated Show resolved Hide resolved
fifo.go Show resolved Hide resolved
lines, err := r.ReadAll()
if err != nil {
logrus.Errorf("Failed to read from fifo: %s", err)
continue
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess that's fine since we wait for the next update to try again. So no log spamming/looping should occur.

Base automatically changed from change/refactor-main to master November 18, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants