Skip to content

Commit

Permalink
refactor(ark-db): indexer table
Browse files Browse the repository at this point in the history
  • Loading branch information
remiroyc committed Sep 7, 2023
1 parent 6a4f777 commit 2db9d26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ark-db/src/indexer/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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()))
Expand Down

0 comments on commit 2db9d26

Please sign in to comment.