-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Top connectors #148
Conversation
filename={`Top Connector Weekly Report (${lastWeek}).tsv`} | ||
src='/api/partners/top-connector' | ||
> | ||
Optimism |
There was a problem hiding this comment.
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`); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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
There was a problem hiding this 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
TODO:
[ ] move Daily Claim in sidebar
[ ] Tests