Skip to content

Commit

Permalink
Launcher minor updates (#633)
Browse files Browse the repository at this point in the history
* Bump maximal tonic version to v0.10

* Make database initialization function to return DatabaseConnection
  • Loading branch information
rimrakhimov authored Oct 16, 2023
1 parent 1521844 commit e261ddf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/blockscout-service-launcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ prometheus = { version = "0.13", optional = true }
reqwest = { version = "0.11", features = ["json"], optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
tokio = { version = "1", optional = true }
tonic = { version = ">= 0.8, < 0.10", optional = true }
tonic = { version = ">= 0.8, < 0.11", optional = true }
tracing = { version = "0.1", optional = true }
tracing-opentelemetry = { version = "0.19", optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"], optional = true }
Expand Down
4 changes: 2 additions & 2 deletions libs/blockscout-service-launcher/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub async fn initialize_postgres<Migrator: MigratorTrait>(
connect_options: impl Into<ConnectOptions>,
create_database: bool,
run_migrations: bool,
) -> anyhow::Result<()> {
) -> anyhow::Result<DatabaseConnection> {
let connect_options = connect_options.into();

// Create database if not exists
Expand Down Expand Up @@ -75,7 +75,7 @@ pub async fn initialize_postgres<Migrator: MigratorTrait>(
Migrator::up(&db, None).await?;
}

Ok(())
Ok(db)
}

fn with_connect_options(url: impl Into<String>, source_options: &ConnectOptions) -> ConnectOptions {
Expand Down

0 comments on commit e261ddf

Please sign in to comment.