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

feat: Add quota info to __heartbeat__ #948

Merged
merged 3 commits into from
Dec 5, 2020
Merged

feat: Add quota info to __heartbeat__ #948

merged 3 commits into from
Dec 5, 2020

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented Dec 4, 2020

Closes #947

Description

Adds quota info to the __heartbeat__ result.

Testing

Set quota via env vars like:

    SYNC_ENABLE_QUOTA=true \
    SYNC_ENFORCE_QUOTA=true \
    SYNC_LIMITS__MAX_QUOTA_LIMIT=10000 \
    ... \
    cargo run 

Verify that

> curl http://localhost:8000/__heartbeat__
{"quota":{"enabled":true,"size":10000},"status":"Ok","version":"0.8.3","database":"Ok"}

If quota is not enabled, __heartbeat__ should return something like:

> curl http://localhost:8000/__heartbeat__
{"version":"0.8.2","database":"Ok","quota":{"enabled":false,"size":2097152000},"status":"Ok"}

(The only field that matters here is enabled.)

Issue(s)

Closes #947.

@jrconlin jrconlin requested a review from a team December 4, 2020 18:12
@jrconlin jrconlin merged commit 19ce36b into master Dec 5, 2020
@jrconlin jrconlin deleted the feat/947-quota branch December 5, 2020 00:09
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.

Add quota info to __heartbeat__
2 participants