Skip to content

Claims remain pending indefinitely when QR is not scanned #36

@TrishaG189

Description

@TrishaG189

Problem

Currently, claims created through the camera flow remain in pending state indefinitely if the QR code is not scanned.

The Raspberry Pi camera app continuously polls for claim status (# Don't stop polling), which means:

  • Unclaimed photos lead to infinite polling loops
  • The claim database accumulates stale entries over time
  • At large events, this can result in unnecessary load and degraded system behavior

Why this matters

In real-world usage, it is common for users to take photos but not complete the claim flow.

Without a lifecycle mechanism:

  • Stale claims are never cleaned up
  • Polling continues indefinitely
  • System behavior becomes inefficient over time

Proposed Solution

  • Add an expires_at field to claims
  • Assign a TTL (default: 15 minutes) at claim creation
  • Introduce a periodic cleanup job to mark expired claims

This ensures:

  • Proper lifecycle management of claims
  • Reduced unnecessary polling
  • Cleaner and more predictable system behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions