Skip to main content

Location Processing Status Type

The LocationProcessingStatus type tracks which location history records have been processed by the geofence processing system.

Type Definition

"""
Tracks which location history rows have been processed by the geofence processing system.
"""
type LocationProcessingStatus {
"""
Unique identifier for the processing status record.
"""
id: ID!

"""
ID of the tracker this processing status belongs to.
"""
trackerId: Int!

"""
Time bucket for processing.
"""
timeBucket: DateTime!

"""
Whether this time bucket has been processed.
"""
processed: Boolean

"""
When the processing occurred.
"""
processedAt: DateTime

"""
The tracker this processing status belongs to.
"""
tracker: Tracker
}

Fields

FieldTypeDescription
idID!Required. Unique identifier
trackerIdInt!Required. ID of the associated tracker
timeBucketDateTime!Required. Time bucket for processing
processedBooleanOptional. Whether processing is complete
processedAtDateTimeOptional. When processing was completed
trackerTrackerOptional. Associated tracker

Connection Type

For paginated queries, the API uses a connection pattern:

"""
Connection type for paginated location processing status records.
"""
type LocationProcessingStatusConnection {
"""
List of edges containing the nodes in this connection.
"""
edges: [LocationProcessingStatusEdge!]!

"""
Pagination information.
"""
pageInfo: PageInfo!

"""
Total count of items in this connection.
"""
totalCount: Int!
}

"""
Edge type for location processing status connections.
"""
type LocationProcessingStatusEdge {
"""
The location processing status node.
"""
node: LocationProcessingStatus!

"""
Cursor for pagination.
"""
cursor: String!
}

Filter Input

"""
Filter input for location processing status queries.
"""
input LocationProcessingStatusFilter {
"""
Filter by tracker ID.
"""
trackerId: Int

"""
Filter by processed status.
"""
processed: Boolean

"""
Filter by time bucket after this time.
"""
timeBucketAfter: DateTime

"""
Filter by time bucket before this time.
"""
timeBucketBefore: DateTime

"""
Filter by processed after this time.
"""
processedAfter: DateTime

"""
Filter by processed before this time.
"""
processedBefore: DateTime
}

Example Query

query GetLocationProcessingStatuses {
locationProcessingStatusesByTracker(
trackerId: 123
first: 10
filter: { processed: false, timeBucketAfter: "2025-01-01T00:00:00Z" }
) {
edges {
node {
id
timeBucket
processed
processedAt
tracker {
id
name
}
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
totalCount
}
}

Geofence Processing

The LocationProcessingStatus type is a key part of the geofence processing system:

  1. Purpose

    • Tracks which location history data has been processed
    • Prevents duplicate processing of the same data
    • Enables efficient incremental processing
  2. Time Buckets

    • Location data is grouped into time buckets for efficient processing
    • Each bucket represents a time period (typically hourly)
    • Processing status is tracked at the bucket level
  3. Processing Flow

    • The system identifies unprocessed time buckets
    • Processes all location data within each bucket
    • Updates the processing status when complete
    • Records the processing timestamp for auditing

Best Practices

  1. Querying

    • Filter by processed: false to find pending work
    • Use time bucket filters to focus on specific time periods
    • Consider pagination for large result sets
  2. Monitoring

    • Track processing completion rates
    • Monitor for stuck or failed processing
    • Check for gaps in processed time buckets
  • locationProcessingStatus
  • locationProcessingStatusesByTracker
  • locationProcessingStatuses