From d619f162aa8a838738821ea811dce0a87e732120 Mon Sep 17 00:00:00 2001 From: Matthew Little Date: Thu, 17 Apr 2025 13:36:26 +0700 Subject: [PATCH] fix: insert last msg id in correct format --- src/pg/ingestion/pg-write-store.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pg/ingestion/pg-write-store.ts b/src/pg/ingestion/pg-write-store.ts index 9962d51..dc208bc 100644 --- a/src/pg/ingestion/pg-write-store.ts +++ b/src/pg/ingestion/pg-write-store.ts @@ -43,7 +43,8 @@ export class PgWriteStore extends BasePgStoreModule { } async updateLastIngestedRedisMsgId(sql: PgSqlClient, msgId: string): Promise { - await sql`UPDATE chain_tip SET last_redis_msg_id = ${msgId}`; + const msgSequenceId = msgId.split('-')[0]; + await sql`UPDATE chain_tip SET last_redis_msg_id = ${msgSequenceId}`; } async applyStackerDbChunk(