Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
darunrs committed Jan 3, 2024
1 parent 47478a5 commit ea2c955
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
11 changes: 11 additions & 0 deletions indexer/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions indexer/queryapi_coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ unescape = "0.1.0"
aws-types = "0.53.0"
aws-credential-types = "0.53.0"
aws-sdk-s3 = "0.23.0"

# grpc
tonic = "0.10.2"
prost = "0.12.3"
protoc = "2.28.0"

[build-dependencies]
tonic-build = "0.10.2"
3 changes: 2 additions & 1 deletion indexer/queryapi_coordinator/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// TODO: Move to New Coordinator Folder
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::compile_protos("../../runner/protos/runner.proto")?;
Ok(())
}
}
1 change: 0 additions & 1 deletion indexer/queryapi_coordinator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::HashMap;

use futures::stream::{self, StreamExt};
use near_jsonrpc_client::JsonRpcClient;
use runner_client::runner_client::ListExecutorsRequest;
use tokio::sync::Mutex;

use indexer_rules_engine::types::indexer_rule_match::{ChainId, IndexerRuleMatch};
Expand Down
3 changes: 2 additions & 1 deletion indexer/queryapi_coordinator/src/runner_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Move to new Coordinator Folder
use runner_client::runner_client::RunnerClient;
use tonic::transport::Channel;

Expand All @@ -11,4 +12,4 @@ pub async fn create_client() -> Result<RunnerClient<Channel>, tonic::transport::
let server_address = format!("http://{}:{}", server_host, server_port);

RunnerClient::connect(server_address).await
}
}
2 changes: 1 addition & 1 deletion runner/src/server/runner-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as protoLoader from '@grpc/proto-loader';
import { type ProtoGrpcType } from '../generated/runner';
import { type RunnerClient } from '../generated/runner/Runner';

// TODO: Replace this client with a Rust client
// TODO: Remove this client when coordinator can make calls

const PROTO_PATH = 'protos/runner.proto';

Expand Down

0 comments on commit ea2c955

Please sign in to comment.