Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indexer: remove logs from default sink #125

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "indexer: remove logs from default sink",
"packageName": "@apibara/indexer",
"email": "[email protected]",
"dependentChangeType": "patch"
}
15 changes: 3 additions & 12 deletions packages/indexer/src/sink.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Cursor, DataFinality } from "@apibara/protocol";
import consola from "consola";
import type { IndexerContext } from "./context";

export type SinkData = Record<string, unknown>;
Expand Down Expand Up @@ -29,19 +28,11 @@ export class DefaultSink extends Sink<unknown> {
await cb({});
}

async invalidateOnRestart(cursor?: Cursor) {
consola.info(
`Invalidating all rows with cursor > ${cursor?.orderKey} on restart`,
);
}
async invalidateOnRestart(cursor?: Cursor) {}

async invalidate(cursor?: Cursor) {
consola.info(`Invalidating cursor ${cursor?.orderKey}`);
}
async invalidate(cursor?: Cursor) {}

async finalize(cursor?: Cursor) {
consola.info(`Finalizing cursor ${cursor?.orderKey}`);
}
async finalize(cursor?: Cursor) {}
}

/** A default sink that does nothing. */
Expand Down
Loading