$callStart static method

Future<void> $callStart(
  1. Node node,
  2. NodeStorage storage,
  3. PrecisionStopwatch wallClock
)

Implementation

static Future<void> $callStart(
    Node node, NodeStorage storage, PrecisionStopwatch wallClock) async {
  if (node is Lifecycle) {
    if ((node as Lifecycle).$isRunning == true) {
      node.logger
          .warn("Node is already running? Call start was called twice?");
    }

    await (node as Lifecycle).onStart();
    node.$metadata["lifecycle.running"] = true;
    node.logger.info(
        "Started in ${wallClock.getMilliseconds().toStringAsFixed(0)}ms");
  }
}