chore: fix formatting for CI
This commit is contained in:
1 parent
7999996bca
commit
b6ff1f81e6
32 files changed
+116
-81
No files matched your search
@@ -32,7 +32,6 @@
|
||||
|
||||
use dagx::{task, DagRunner};
|
||||
|
||||
|
||||
// Step 1: Define a source task (no dependencies)
|
||||
//
|
||||
// Source tasks produce initial data for the DAG.
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
|
||||
use dagx::{task, DagRunner, TaskHandle};
|
||||
|
||||
|
||||
// Source task with a value field
|
||||
struct Source {
|
||||
initial_value: i32,
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
|
||||
use dagx::{task, DagRunner};
|
||||
|
||||
|
||||
struct FetchName;
|
||||
|
||||
#[task]
|
||||
|
||||
@@ -125,7 +125,8 @@ async fn main() -> DagResult<()> {
|
||||
|
||||
let total = dag.add_task(Aggregate).depends_on((sum1, sum2, sum3, sum4));
|
||||
|
||||
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() }).await?;
|
||||
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
|
||||
.await?;
|
||||
|
||||
let result = dag.get(total)?;
|
||||
let elapsed = start.elapsed();
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
|
||||
use dagx::{task, DagResult, DagRunner};
|
||||
|
||||
|
||||
// Extract: Load data from different sources
|
||||
struct LoadData {
|
||||
source: &'static str,
|
||||
@@ -202,7 +201,8 @@ async fn main() -> DagResult<()> {
|
||||
|
||||
// Execute the entire ETL pipeline
|
||||
println!("Executing pipeline...\n");
|
||||
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() }).await?;
|
||||
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
|
||||
.await?;
|
||||
|
||||
// Display final report
|
||||
println!("\n{}", dag.get(report)?);
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
|
||||
use dagx::{task, DagResult, DagRunner};
|
||||
|
||||
|
||||
// Task that validates and processes input
|
||||
struct ValidateAndDouble {
|
||||
value: i32,
|
||||
@@ -138,7 +137,8 @@ async fn main() -> DagResult<()> {
|
||||
.depends_on((&cat1, &cat2, &cat3));
|
||||
|
||||
// Execute
|
||||
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() }).await?;
|
||||
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
|
||||
.await?;
|
||||
|
||||
// Display results
|
||||
println!("\nFinal summary: {}", dag.get(summary)?);
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
use dagx::{task, DagRunner, TaskHandle};
|
||||
|
||||
|
||||
#[derive(Debug)]
|
||||
struct User {
|
||||
name: String,
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
|
||||
use dagx::{task, DagRunner};
|
||||
|
||||
|
||||
// Data source tasks
|
||||
struct LoadValue1;
|
||||
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
|
||||
use dagx::{task, DagRunner};
|
||||
|
||||
|
||||
// Source task that provides a string input
|
||||
struct StringSource(&'static str);
|
||||
|
||||
|
||||
Reference in new issue
Block a user