barley-std
This crate contains the standard library for the barley workflow engine. It provides a set of common actions that can be used in any script.
Usage
use *;
use Sleep;
use Duration;
async
barley-stdThis crate contains the standard library for the barley workflow engine. It provides a set of common actions that can be used in any script.
use barley_runtime::prelude::*;
use barley_std::thread::Sleep;
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), ActionError> {
tracing_subscriber::fmt::init();
let sleep_1 = Sleep::new(Duration::from_secs(1));
let sleep_2 = Sleep::new(Duration::from_secs(2));
RuntimeBuilder::new()
.add_action(sleep_1.into()).await
.add_action(sleep_2.into()).await
.build()
.run()
.await
}