Skip to content

Check if node is running #164

Closed
Closed

Description

@jbesraa

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 }
}

Activity

  1. tnull commented on Sep 27, 2023

    @tnull
    Collaborator

    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

  2. added this to the 0.2 milestone on Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions