Skip to content

Commit

Permalink
enh: improve types in ingestion.ts (#4)
Browse files Browse the repository at this point in the history
* enh: improve types in ingestion.ts

* Align import
  • Loading branch information
haecheonlee authored Jun 2, 2024
1 parent 34d0423 commit 055b3dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/ingestion.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MikroORM } from '@mikro-orm/postgresql';
import { Consumer } from 'nats';

import { logger } from './logger'
import { NatsMessage } from './nats'
Expand Down Expand Up @@ -34,7 +35,7 @@ const persistFetchedRecords = (

const fetchNatsMessages = async (
{ consumer, fetchBatchSize, lastStreamSequence }:
{ consumer: any, fetchBatchSize: number, lastStreamSequence: number | null }
{ consumer: Consumer, fetchBatchSize: number, lastStreamSequence: number | null }
) => {
const natsMessageBySequence: { [sequence: number]: NatsMessage } = {}
let pendingMessageCount = 0
Expand Down Expand Up @@ -65,7 +66,7 @@ export const runIngestionLoop = async (
useBuffer = false,
}: {
orm: MikroORM,
consumer: any,
consumer: Consumer,
fetchBatchSize?: number,
insertBatchSize?: number,
useBuffer?: boolean,
Expand Down

0 comments on commit 055b3dc

Please sign in to comment.