Skip to main content

RunCommand

Struct RunCommand 

Source
pub struct RunCommand {
Show 15 fields pub dataflow: String, pub uv: bool, pub stop_after: Option<Duration>, pub log_level: LogLevelOrStdout, pub log_format: LogFormat, pub log_filter: Option<String>, pub allow_shell_nodes: bool, pub debug: bool, pub locked: bool, pub write_lockfile: bool, pub lockfile: Option<PathBuf>, pub working_dir: Option<PathBuf>, pub hub_override: Vec<String>, pub env: Vec<String>, pub exit_when_nodes_finish: Option<bool>,
}
Expand description

Run a dataflow locally in isolation.

Spawns nodes in-process without a coordinator. CLI monitoring commands (dora list, dora stop, dora logs, …) do NOT attach to a dora run execution. Use dora up + dora start instead when you need to attach those tools or run multiple coordinated dataflows.

Fields§

§dataflow: String

Path to the dataflow descriptor file

§uv: bool§stop_after: Option<Duration>

Automatically stop the dataflow after the given duration

The command will send a stop message after the specified time has elapsed, similar to pressing Ctrl-C. This gracefully stops all nodes in the dataflow.

Examples: –stop-after 30 # 30 seconds (a bare number is seconds) –stop-after 10s # 10 seconds –stop-after 5m # 5 minutes –stop-after 1h30m # 1 hour 30 minutes –stop-after 500ms # 500 milliseconds

§log_level: LogLevelOrStdout

Minimum log level to display

Levels: error, warn, info, debug, trace, stdout (default). “stdout” shows everything including raw stdout from nodes.

§log_format: LogFormat

Output format for log messages

json emits JSON Lines (one object per log message).

§log_filter: Option<String>

Per-node log level filter

Format: “node1=level,node2=level”. Overrides –log-level for matched nodes.

Examples: –log-filter “sensor=debug,processor=warn”

§allow_shell_nodes: bool

Allow shell nodes to execute arbitrary commands.

Shell nodes are disabled by default for security reasons. This flag sets the DORA_ALLOW_SHELL_NODES environment variable.

§debug: bool

Enable debug mode (publishes all messages to Zenoh for topic echo/hz/info)

§locked: bool

Use pinned git source commits from a lockfile during pre-run build.

§write_lockfile: bool

Write resolved git source commits to a lockfile during pre-run build.

§lockfile: Option<PathBuf>

Path to build lockfile (defaults to <dataflow-stem>.dora-lock.yaml).

§working_dir: Option<PathBuf>

Decouples the working dir used for descriptor-relative paths from the dataflow file’s parent. Needed when the path passed in is a rewritten copy (e.g. dora record’s tempfile) whose parent can’t resolve the original build: / relative-path references.

§hub_override: Vec<String>

Substitute a local checkout for a hub package (UC11 inner loop): --hub-override <namespace>/<name>=<path>. Same as dora build --hub-override; dora run is always local, so it applies directly.

§env: Vec<String>

Set an environment variable for every node of this dataflow (repeatable). Merges into the dataflow-level env: block; node-level env: entries still win on conflict.

Under dora run nodes also inherit this process’s environment, but --env is the portable spelling that behaves identically under dora start (where nodes inherit the DAEMON’s environment instead). Applies at spawn time only; build: commands are unaffected. Values must survive the descriptor encoding verbatim: a literal $ is refused (the receiving process would expand it) and so are numeric-looking values that would be coerced.

§exit_when_nodes_finish: Option<bool>

Exit once every node has finished, treating dora/timer/... inputs as a clock rather than as work.

By default a node is only told its inputs are closed when ALL of them are, and a timer input never closes — so a graph where any node consumes a timer cannot finish on its own, even after every worker has done its work. With this flag a node is finished once its DATA inputs have closed, which makes “run N items and exit” scriptable without wrapping the command in a timeout.

Nodes whose inputs are all timers are unaffected: they have no data dependency that could finish, so they are treated as sources, exactly as a node with no inputs is.

Overrides exit_when_nodes_finish: in the dataflow YAML in either direction: pass the flag to force it on, or --exit-when-nodes-finish=false to force it off for a descriptor that asks for it. Omit it entirely and the descriptor decides.

Implementations§

Source§

impl Run

Source

pub fn new(dataflow: String) -> Self

Source

pub fn with_working_dir(self, working_dir: PathBuf) -> Self

Trait Implementations§

Source§

impl Args for Run

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for Run

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Executable for Run

Source§

impl FromArgMatches for Run

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

§

impl Freeze for Run

§

impl RefUnwindSafe for Run

§

impl Send for Run

§

impl Sync for Run

§

impl Unpin for Run

§

impl UnsafeUnpin for Run

§

impl UnwindSafe for Run

Blanket Implementations§

Source§

impl<Source> AccessAs for Source

Source§

fn ref_as<T>(&self) -> <Source as IGuardRef<T>>::Guard<'_>
where Source: IGuardRef<T>, T: ?Sized,

Provides immutable access to a type as if it were its ABI-unstable equivalent.
Source§

fn mut_as<T>(&mut self) -> <Source as IGuardMut<T>>::GuardMut<'_>
where Source: IGuardMut<T>, T: ?Sized,

Provides mutable access to a type as if it were its ABI-unstable equivalent.
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsNode<T> for T

Source§

fn as_node(&self) -> &T

Source§

impl<T> AsNodeMut<T> for T

Source§

fn as_node_mut(&mut self) -> &mut T

Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> FitForCBox for T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T, As> IGuardMut<As> for T
where T: Into<As>, As: Into<T>,

Source§

type GuardMut<'a> = MutAs<'a, T, As> where T: 'a

The type of the guard which will clean up the temporary after applying its changes to the original.
Source§

fn guard_mut_inner(&mut self) -> <T as IGuardMut<As>>::GuardMut<'_>

Construct the temporary and guard it through a mutable reference.
Source§

impl<T, As> IGuardRef<As> for T
where T: Into<As>, As: Into<T>,

Source§

type Guard<'a> = RefAs<'a, T, As> where T: 'a

The type of the guard which will clean up the temporary.
Source§

fn guard_ref_inner(&self) -> <T as IGuardRef<As>>::Guard<'_>

Construct the temporary and guard it through an immutable reference.
Source§

impl<T> Includes<End> for T

Source§

type Output = End

The result
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> ManuallyDropMut for T

Source§

type Ret = ManuallyDrop<T>

Source§

fn manually_drop_mut<'__>(&'__ mut self) -> &'__ mut ManuallyDrop<T>

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UpcastAny for T
where T: 'static,

Source§

fn upcast_any(&self) -> &(dyn Any + 'static)

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<F> ZeroSizedElseWrathOfTheGඞds for F