Skip to content

Commit

Permalink
Fixing database_url for envio indexer and histoflux
Browse files Browse the repository at this point in the history
  • Loading branch information
leboiko committed Jan 22, 2025
1 parent 17f2d08 commit 6199b4e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ services:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_REGION: $AWS_REGION
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
DATABASE_URL: $DATABASE_URL
INDEXER_DATABASE_URL: $DATABASE_URL
RAW_CONSUMER_QUEUE_URL: $RAW_CONSUMER_QUEUE_URL
HYPERSYNC_TOKEN: $HYPERSYNC_TOKEN
INDEXER_SCHEMA: $INDEXER_SCHEMA
Expand Down Expand Up @@ -332,7 +332,7 @@ services:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_REGION: $AWS_REGION
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
DATABASE_URL: $DATABASE_URL
INDEXER_DATABASE_URL: $DATABASE_URL
LOCALSTACK_URL: $LOCALSTACK_URL
HISTOFLUX_CURSOR_ID: $HISTOFLUX_CURSOR_ID
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions envio-indexer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct Env {
pub hypersync_token: String,
pub localstack_url: Option<String>,
pub raw_consumer_queue_url: String,
pub database_url: String,
pub indexer_database_url: String,
pub indexer_schema: String,
}

Expand Down Expand Up @@ -48,7 +48,7 @@ impl App {
// Create the SQS client
let aws_sqs_client = Self::get_aws_client(env.localstack_url.clone()).await;
// Connect to the database
let pg_pool = connect_to_db(&env.database_url).await?;
let pg_pool = connect_to_db(&env.indexer_database_url).await?;

Ok(Self {
client,
Expand Down
4 changes: 2 additions & 2 deletions histoflux/src/app_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use sqlx::PgPool;
#[derive(Clone, Deserialize, Debug)]
pub struct Env {
pub localstack_url: Option<String>,
pub database_url: String,
pub indexer_database_url: String,
pub histoflux_cursor_id: i32,
}

Expand Down Expand Up @@ -58,7 +58,7 @@ impl SqsProducer {
// Create the SQS client
let client = Self::get_aws_client(env.localstack_url.clone()).await;
// Connect to the database
let pg_pool = connect_to_db(&env.database_url).await?;
let pg_pool = connect_to_db(&env.indexer_database_url).await?;

let cursor = HistoFluxCursor::find(&pg_pool, env.histoflux_cursor_id)
.await?
Expand Down

0 comments on commit 6199b4e

Please sign in to comment.