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

Check if node is running #164

Closed
jbesraa opened this issue Sep 25, 2023 · 1 comment · Fixed by #169
Closed

Check if node is running #164

jbesraa opened this issue Sep 25, 2023 · 1 comment · Fixed by #169
Milestone

Comments

@jbesraa
Copy link
Contributor

jbesraa commented Sep 25, 2023

It would be useful to expose a function to check if the node is running (ie node.start() ) was invoked.

A possible solution:

/// Check if node runtime is up
pub fn is_node_running(&self) -> bool {
    if self.runtime.read().unwrap().is_some() {
          true
     }
    else { false }
}
@tnull
Copy link
Collaborator

tnull commented Sep 27, 2023

Yeah, makes sense to me. Feel free to open a corresponding PR, otherwise I'll make sure to include it in the next release. FWIW, I think I'd prefer the method name to be just is_running

@tnull tnull added this to the 0.2 milestone Sep 27, 2023
@tnull tnull mentioned this issue Sep 27, 2023
9 tasks
@tnull tnull closed this as completed in #169 Oct 5, 2023
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 a pull request may close this issue.

2 participants