-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd9a1be
commit b41920d
Showing
6 changed files
with
32 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Hubble is an omnichain indexer. | ||
|
||
> **Warning** | ||
> This is not ready for public usage. It can index tendermint chains, but the schema is not public yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
use clap::Parser; | ||
use tracing::info; | ||
use tracing::{error, info}; | ||
mod cli; | ||
mod hasura; | ||
mod tm; | ||
|
||
#[tokio::main(flavor = "current_thread")] | ||
#[tokio::main] | ||
async fn main() { | ||
color_eyre::install().unwrap(); | ||
|
||
let args = crate::cli::Args::parse(); | ||
tracing_subscriber::fmt::init(); | ||
|
||
let mut handles = vec![]; | ||
|
||
for indexer in args.indexers.into_iter() { | ||
info!("starting indexer {:?}", indexer); | ||
let url = args.hasura.clone(); | ||
let url = args.url.clone(); | ||
let secret = args.secret.clone(); | ||
tokio::task::spawn_local(async move { indexer.index(&url, &secret).await.unwrap() }); | ||
handles.push(tokio::task::spawn(async move { | ||
// indexer should never return with Ok, thus we log the error. | ||
let result = indexer.index(&url, &secret).await; | ||
error!("indexer {:?} exited with: {:?}", &indexer, result); | ||
})); | ||
} | ||
|
||
futures::future::join_all(handles).await; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters