-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Create two new status endpoints to track the reindex execution in the new prioritized reindex queue functionality of the /reindex/<entity id> endpoint.
GET /reindex-status
returns a json response with the following attributes and associated real-time values:
num_reindexingthe number of items currently being reindexedpriority_1_queuedthe number of items in the queue at priority level 1priority_2_queuedthe number of items in the queue at priority level 2priority_3_queuedthe number of items in the queue at priority level 3average_reindex_timethe real-time running average of how long it takes to reindex entities
Included only if the optional query parameter ?all-queued=true is included
queued_entities- a list of all queued entities (not including those executing) in the order that they are queued with each item in the list containing an entry about an entity with the following attributes:uuid- the uuid of the entityhubmap_id- the hubmap_id of the entitypriority- the reindexing priority (1 ,2 or 3)queued_timestamp- the timestamp of when the entity was originally placed on the queuepriority_updated_timestamp- the timestamp of when the priority of the item was re-prioritiezed, either automatically because it was re-requested at a higher priority or because the priority was changed via thePUT /reindex/<entity id>/priorityendpoint
Included only if the optional query parameter ?all-reindexing=true is included:
reindexing_entities- a list of entities currently being reindexed with each item in the list containing an entry about an entity with the following attributes:uuid- the uuid of the entityhubmap_id- the hubmap_id of the entitypriority- the reindexing priority (1 ,2 or 3)reindex_start_timestamp- the timestamp of when reindexing for the entity was startedqueued_timestamp- the timestamp of when the entity was originally placed on the queuepriority_updated_timestamp- the timestamp of when the priority of the item was re-prioritiezed, either automatically because it was re-requested at a higher priority or because the priority was changed via thePUT /reindex/<entity id>/priorityendpoint
GET /reindex-status/<entity id>
returns a json response with the following attributes and associated real-time values about the requested entity or a 404 if the entity isn't found in the queue
- uuid- the uuid of the entity
- hubmap_id - the hubmap_id of the entity
- priority - the reindexing priority (1 ,2 or 3)
- queued_timestamp - the timestamp of when the entity was originally placed on the queue
- priority_updated_timestamp - the timestamp of when the priority of the item was re-prioritiezed, either automatically because it was re-requested at a higher priority or because the priority was changed via the PUT /reindex/<entity id>/priority endpoint
execution_number_in_priority- optional, only if not currently executing reindex- the number of entities ahead of the requested entity in the queue that are the same priority level as the entityreindex_start_timestamp- optional, only if currently executing reindex- the timestamp of when reindexing for the entity was started
Metadata
Metadata
Assignees
Labels
Type
Projects
Status