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(server): billing for all apps including stopped apps #1781

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Conversation

0fatal
Copy link
Contributor

@0fatal 0fatal commented Jan 5, 2024

need to set it to the whole hour of the current time to reset the billing time.

use sys_db

const currentTime = new Date();

currentTime.setMinutes(0);
currentTime.setSeconds(0);
currentTime.setMilliseconds(0);

db.Application.updateMany({}, { $set: {
   latestBillingTime: currentTime
}})

Copy link

sweep-ai bot commented Jan 5, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link

github-actions bot commented Jan 5, 2024

💥 laf server image built successfully for pr 1781

ghcr.io/labring/laf-server:pr-1781
docker.io/lafyun/laf-server:pr-1781

digest: sha256:7360fe578f538db9954cf6c91984418b41e29282e0e90b9e281e4240a49e748c

@0fatal 0fatal marked this pull request as draft January 5, 2024 05:01
@0fatal 0fatal marked this pull request as ready for review January 8, 2024 04:26
@HUAHUAI23 HUAHUAI23 merged commit 6cb7e57 into main Feb 22, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants