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

Split tasks spawned by CLI commands into their own modules #331

Merged
merged 13 commits into from
Oct 22, 2020

Conversation

romac
Copy link
Member

@romac romac commented Oct 19, 2020

First small step towards #330

Description

Split tasks spawned by CLI commands into their own modules.


For contributor use:

  • Unit tests written
  • Added test to CI if applicable
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer

Copy link
Member

@adizere adizere left a comment

Choose a reason for hiding this comment

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

Cool, looks cleaner than before!

Some suggestion to try to further improve this (defer to next iteration of work towards #330):

  • I suspect relayer-cli/src/commands/utils.rs can be deleted
  • it would improve readability if all files in commands.rs have the same structure: definition of pub struct xyzCmd, then implementation of that struct, then impl Runnable for xyzCmd

Copy link
Member

@adizere adizere left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good, I had nothing to comment.

@ancazamfir
Copy link
Collaborator

So start command doesn't start the monitors anymore? Just the light clients? I think the README.md needs a small update.

@romac
Copy link
Member Author

romac commented Oct 21, 2020

So start command doesn't start the monitors anymore? Just the light clients? I think the README.md needs a small update.

It never did that AFAIK.

@ancazamfir
Copy link
Collaborator

So start command doesn't start the monitors anymore? Just the light clients? I think the README.md needs a small update.

It never did that AFAIK.

Just checked, it did before #255, the start command was starting them together with the event_handler from the relayer_task(). We also have the listen command that just starts the monitors and prints the events.

Copy link
Collaborator

@ancazamfir ancazamfir left a comment

Choose a reason for hiding this comment

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

Looks good!

@romac
Copy link
Member Author

romac commented Oct 22, 2020

So start command doesn't start the monitors anymore? Just the light clients? I think the README.md needs a small update.

It never did that AFAIK.

Just checked, it did before #255, the start command was starting them together with the event_handler from the relayer_task(). We also have the listen command that just starts the monitors and prints the events.

Right, my bad! Since we are going to rewrite this code for v0 anyway, it doesn't really matter so I guess we can just go ahead and merge this.

@romac romac merged commit 2495af7 into master Oct 22, 2020
@romac romac deleted the romac/cleanup-app branch October 22, 2020 10:02
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
…ystems#331)

* Cleanup listen and start commands

* Better error handling in listen command

* Move event listener code into its own task module

* Move light client and relayer tasks into their own modules

* Remove light client config file from Git

* Remove local config file

* Add doc comments to light client and relayer tasks

* Remove unused import

* Remove unused utils module

* Remove unused lint

* Reorder code blocks

* Update changelog
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