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

Top connectors #148

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Top connectors #148

wants to merge 2 commits into from

Conversation

valentinludu
Copy link
Contributor

@valentinludu valentinludu commented Jan 10, 2025

TODO:
[ ] move Daily Claim in sidebar
[ ] Tests

filename={`Top Connector Weekly Report (${lastWeek}).tsv`}
src='/api/partners/top-connector'
>
Optimism
Copy link
Member

Choose a reason for hiding this comment

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

should say "Top Connector"

const lastWeek = getLastWeek();
const rows = await getScoutsForTopConnectorPartner({ week: lastWeek });

return respondWithTSV(rows, `partners-export_supersim_${lastWeek}.tsv`);
Copy link
Member

Choose a reason for hiding this comment

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

update the filename: "export_top_connectors" and i dont think u need to export a week at a time. it coould just be an export for the last 14 days or soemthing?

const events = await prisma.builderEvent.findMany({
where: {
type: 'top_connector',
week
Copy link
Member

Choose a reason for hiding this comment

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

mentioned above but i think this report should always give you the most recent data available at least. or maybe do this week and last week?

}) {
await prisma.builderEvent.create({
data: {
bonusPartner: 'top-connector',
Copy link
Member

Choose a reason for hiding this comment

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

this is not what bonusPartner was intended for. it should only be for real partners that for example live on the partners page

Copy link
Member

@mattcasey mattcasey left a comment

Choose a reason for hiding this comment

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

if we dont need cron i rather we not use it. some extra queries is way easier to manage and follow than a new "process" (even if its built on an existing service) running in production. i don't see why admin can't just calculate the top connectors on the fly. And I think this also means we dont need to extend builder event

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