From 2db9d26be00179b041a2c159b3f3fe6c27fc8ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Roycourt?= Date: Thu, 7 Sep 2023 18:48:50 +0200 Subject: [PATCH] refactor(ark-db): indexer table --- crates/ark-db/src/indexer/update.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ark-db/src/indexer/update.rs b/crates/ark-db/src/indexer/update.rs index 089b52af9..c69805586 100644 --- a/crates/ark-db/src/indexer/update.rs +++ b/crates/ark-db/src/indexer/update.rs @@ -23,7 +23,7 @@ pub async fn update_indexer( .put_item() .table_name(indexer_table_name) .item("PK", AttributeValue::S(String::from("INDEXER"))) - .item("SK", AttributeValue::S(task_id.to_string())) + .item("SK", AttributeValue::S(format!("TASK#{}", task_id))) .item("status", AttributeValue::S(status)) .item("last_update", AttributeValue::N(unix_timestamp.to_string())) .item("version", AttributeValue::S(indexer_version)) @@ -57,7 +57,7 @@ pub async fn update_block(dynamo_client: &Client, task_id: &str, block_number: u .put_item() .table_name(indexer_table_name) .item("PK", AttributeValue::S(format!("BLOCK#{}", block_number))) - .item("SK", AttributeValue::S(task_id.to_string())) + .item("SK", AttributeValue::S(format!("TASK#{}", task_id))) .item("is_fetched", AttributeValue::Bool(true)) .item("last_update", AttributeValue::N(unix_timestamp.to_string())) .item("indexer", AttributeValue::S(task_id.to_string()))