Skip to content

Commit

Permalink
Improve backfill progress ui (#22)
Browse files Browse the repository at this point in the history
* chore(core): remove codegen log and simplify backfill logs

* docs(core): add readme for eta calculation approach

* chore(examples): update handler

* feat(cope): wip eta impl

* refactor(core): use typed event emitter

* feat(core): add new eta calculation, split out progress for sources, add cache pickup

* refactor(core): remove checkpoints

* feat(core): improve handler progress bar

* feat(core): change cached part to white color, improve handler progress text

* test(core): fix event names

* chore(core): delete readme
  • Loading branch information
0xOlias committed Dec 28, 2022
1 parent d1ccb5d commit 8b41e20
Show file tree
Hide file tree
Showing 21 changed files with 624 additions and 422 deletions.
14 changes: 6 additions & 8 deletions examples/art-gobblers/handlers/ArtGobblers.ts
@@ -1,14 +1,12 @@
import { ArtGobbledHandler } from "../generated/handlers";

const handleArtGobbled: ArtGobbledHandler = async (event, context) => {
console.log("Art Gobbled!");

context.entities.GobbledArt.insert(`${event.params.nft}-${event.params.id}`, {
id: `${event.params.nft}-${event.params.id}`,
user: event.params.user,
});

return;
await context.entities.GobbledArt.insert(
`${event.params.nft}-${event.params.id}`,
{
user: event.params.user,
}
);
};

export const ArtGobblers = {
Expand Down
3 changes: 2 additions & 1 deletion packages/core/package.json
Expand Up @@ -51,6 +51,7 @@
"@types/node": "^18.7.8",
"@types/react": "^18.0.25",
"jest": "^29.3.1",
"tsconfig-replace-paths": "^0.0.11"
"tsconfig-replace-paths": "^0.0.11",
"typed-emitter": "^2.1.0"
}
}

1 comment on commit 8b41e20

@vercel
Copy link

@vercel vercel bot commented on 8b41e20 Dec 28, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.