Skip to content

Conversation

@8bcb
Copy link
Collaborator

@8bcb 8bcb commented Jan 11, 2022

No description provided.

@ppedziwiatr ppedziwiatr self-requested a review January 11, 2022 17:08
src/db/schema.ts Outdated
table.bigInteger("block_height").notNullable().index();
table.string("block_id").notNullable();
table.string("timestamp").index();
table.jsonb("tags");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't tags be a separate table? I believe it could simplify future queries (I know that postgres has cool support for json, but still..)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, table should be named stats_contracts - and if we decide to move the tags to a separate one - stats_tags


const currentNetworkHeight = results[1].value.height;

const lastProcessedBlockHeight = results[0].value?.block_height || 472808;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

472808 deserves its own constant ;-) to be used in syncTask


}

async function loadPages(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should refactor this to some common function, that would be also used in the sync interactions task?

ar
}
data {
size
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size doesn't seem to be stored in the db...

@8bcb 8bcb force-pushed the asiaziola/stats-task branch from 1b3078a to d402442 Compare January 14, 2022 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants