Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the instantiation process as per the async. #11

Conversation

AmitsinghTanwar007
Copy link
Collaborator

No description provided.

@NishantJoshi00
Copy link
Owner

please remove .DS_Store and .sqlx folder/file

@@ -284,3 +342,91 @@ impl server_traits::DriverDetails for super::Runtime {
}))
}
}

// #[tonic::async_trait]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't put commented code

@@ -0,0 +1 @@
UPI_HOST=34.93.161.62
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't commit envs

Comment on lines 12 to 16
# grpcurl -plaintext -d @ localhost:8080 finternet.PrintMessage/Print <<EOM
# {
# "message":"hello grpc"
# }
# EOM
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code

src/server.rs Outdated
Comment on lines 101 to 102
// .add_service(user_sign_up_service)
// .add_service(user_login_sevice)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't keep commented code

@@ -170,6 +170,7 @@ impl DriverStorage for SqliteStorage {
driver_info: &DriverInfo,
engine: wasmtime::Engine,
) -> Result<Option<Component>> {
println!("i will panic here");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

@@ -35,6 +84,7 @@ impl server_traits::Execution for super::Runtime {
&self,
request: Request<types::ExecutionRequest>,
) -> Result<Response<types::ExecutionResponse>, tonic::Status> {
// let user_id= get_user_id(&request).map_err(|e| tonic::Status::internal(e.to_string()))?;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

None => return Err(Box::new(Status::unauthenticated("No JWT token found"))),
};

let secret = b"finternet";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't hardcode secrets take them from the config

wasmtime_wasi::add_to_linker_async(&mut linker).map_err(|err| {
types::component::module::component::units::driver::DriverError::SystemError(err.to_string())
})?;
println!("error is here");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this print

@@ -134,7 +135,7 @@ struct Config {
impl Config {
fn new() -> Self {
Config {
host: format!("http://{}:8030", env!("UPI_HOST")),
host: format!("http://34.93.161.62:8030"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use env, don't do this

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't commit .sqlx file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants