Skip to content

Report when each kind of data was last updated #101

Closed

Description

@selvarajuv

Problem

The manager can't tell whether the rates are fresh. If the events refresh or an upload failed yesterday, the rates may be stale and nothing says so.

Goal

One endpoint says when each kind of data was last successfully updated for a hotel.

Scope

  • An endpoint, e.g. GET /hotels/{id}/freshness, returning the time of the last successful:
    • events refresh;
    • weather refresh;
    • hotel data upload;
    • training run;
    • recommendation snapshot.
  • Also return whether the latest attempt of each kind failed, and when.
  • Read from the existing jobs and snapshots; no new table.

Considerations

  • Decide when each kind counts as stale (e.g. events older than a day) and return a flag, so the frontend doesn't have to know the rules.

Acceptance criteria

  • The endpoint returns a time for each kind, or none if it has never run.
  • A failed latest run is shown along with the last successful one.
  • Tests cover never run, succeeded and failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apiRoutes, services, models and repositories for recommendations and feedbackfeatureIntroduces a new and complete feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions