Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,10 @@ Topograph offers three endpoints for interacting with the service. Below are the
- **URL Query Parameters:**
- **uid**: Specifies the request ID returned by the topology request endpoint.
- **Response:** Depending on the request's execution stage, this endpoint can return:
- "404 NotFound" if the configuration is not ready yet.
- "200 OK" if the request has been completed successfully.
- "500 InternalServerError" if there was an error during request execution.
- "200 OK" - The request has completed successfully.
- "102 Processing" - The request is still in progress and has not completed yet.
- "404 Not Found" - The specified request ID does not exist.
- Other error responses encountered by Topograph during request execution.

Example usage:

Expand Down
6 changes: 4 additions & 2 deletions pkg/server/trailing_delay_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ func (q *TrailingDelayQueue) Get(uid string) *Completion {
return res.(*Completion)
}

completion := &Completion{Message: fmt.Sprintf("no data for request ID %s", uid)}
completion := &Completion{}
if uid == q.uid {
completion.Status = http.StatusAccepted
completion.Message = fmt.Sprintf("request ID %s has not completed yet", uid)
completion.Status = http.StatusProcessing
} else {
completion.Message = fmt.Sprintf("request ID %s not found", uid)
completion.Status = http.StatusNotFound
}

Expand Down
Loading