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

Store and expose the database load timestamp #510

Closed
1 task
thekaveman opened this issue Dec 18, 2024 · 1 comment · Fixed by #512
Closed
1 task

Store and expose the database load timestamp #510

thekaveman opened this issue Dec 18, 2024 · 1 comment · Fixed by #512
Assignees
Labels
enhancement New feature or request

Comments

@thekaveman
Copy link
Member

thekaveman commented Dec 18, 2024

It would be helpful to know the timestamp of when the database was last (re)loaded.

Idea:

  • During db-init, create a new table to store a single record with the current timestamp when db-init is called
  • Create an endpoint like /metadata that returns a JSON blob like:
{
  "app": {
    "version": "version string"
  },
  "db": {
    "timestamp": "stored timestamp",
    "users": 123, //count of users in DB
    "eligibility": ["list", "of", "types"]
   }
}

Acceptance Criteria

  • We have an easy way to tell when the database was last refreshed, and some basic stats about the current state of the app/database

Additional context

Related to debugging cal-itp/benefits#2598

@thekaveman thekaveman added the enhancement New feature or request label Dec 18, 2024
@thekaveman thekaveman moved this from Todo to In progress in Digital Services Dec 18, 2024
@thekaveman thekaveman self-assigned this Dec 18, 2024
@thekaveman thekaveman moved this from In progress to Blocked in Digital Services Dec 19, 2024
@thekaveman
Copy link
Member Author

thekaveman commented Dec 19, 2024

PR #512 is up and the code is ready and working.

But we're currently blocked by #511 as this PR will need to build/deploy the infrastructure pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant