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

feat: stats task added #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: stats task added #29

wants to merge 1 commit into from

Conversation

asiaziola
Copy link
Collaborator

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...

@asiaziola asiaziola 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.

2 participants