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

fix: ponder stats api #14

Merged
merged 1 commit into from
Jan 27, 2025
Merged

fix: ponder stats api #14

merged 1 commit into from
Jan 27, 2025

Conversation

technophile-04
Copy link
Member

@technophile-04 technophile-04 commented Jan 27, 2025

Description:

Since in earlier version division was our last operation(we divide by 1000 to convert ms => s), the final result in lastMonth variable was decimal

eg: 1735405670.629

The new changes first converts ms => s, take the math.floor value and then subtract 30 days in seconds from it. This makes sure we are always in integer land.

Also the reason why its not breaking in dev server and breaking in prod server is in development ponder.sh uses sqlite which is more lenient with type coercion, but in prod we are using postgres SQL.

Fixes #12

Copy link

vercel bot commented Jan 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ctf.buidlguidl.com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2025 5:21pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
ctf-devcon ⬜️ Ignored (Inspect) Jan 27, 2025 5:21pm

Copy link
Contributor

@carletex carletex left a comment

Choose a reason for hiding this comment

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

Thanks Shiv!

@carletex carletex merged commit ca514c2 into main Jan 27, 2025
4 checks passed
@carletex carletex deleted the fix-ponder-stats branch January 27, 2025 17:34
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.

Ponder error on PROD
2 participants